CS 6030 Bioinformatics Summer II 2012 Semester Project Final Report Chandana Sripha Guduru Jason Eric Johnson

Size: px
Start display at page:

Download "CS 6030 Bioinformatics Summer II 2012 Semester Project Final Report Chandana Sripha Guduru Jason Eric Johnson"

Transcription

1 CS 6030 Bioinformatics Summer II 2012 Semester Project Final Report Chandana Sripha Guduru Jason Eric Johnson 1

2 Team Members:! 3 Project Description:! 3 Project Goals:! 3 Research/Design:! 3 Web Service Interface[NCBI BLAST (REST)]9:! 3 Advantages of Using HTTP Requests for the Service:! 4 Implementation:! 4 Testing:! 4 Procedure:! 4 Test Data:! 4 Results:! 4 Future Work:! 5 References:! 5 Appendix A: Test Data! 5 Appendix B: Source Code! 6 2

3 Team Members: Chandana Sripha Guduru Jason Eric Johnson Project Description: Our project, called BioPad, consists of a mobile application for ipad that allows a user to make use of the NCBI BLAST web API available from the European Biometrics Institute 1 (EBI). The EBI provides a large number of functions in the areas of Data Retrieval, Analysis Tools, Sequence Similarity Search 2, Multiple Sequence Alignment 3, Phylogeny 4, Pairwise Sequence Analysis 5, Sequence Statistics 6, Sequence Translations 7, Structural Analysis 8 and Literature and Ontology database searches. The application allows for full configuration of an NCBI BLAST protein search, submission of the search, and storage and retrieval of previous jobs. Project Goals: The main goal of this project was to an NCBI BLAST search, but we will continue after the class to implement as many specific functions as are feasible given time restrictions. We wanted an intuitive ipad application that will allow a user to create the jobs by selection and input of appropriate parameters. The application would then implement/ monitor those jobs through the EBI APIs. The final deliverable will be an application that is well-designed and intuitive. We would hope to eventually have the application functional for several types of query and to distribute it for free via the ios App Store. Research/Design: Web Service Interface[NCBI BLAST (REST)] 9 : The NCBI provides two programmatic methods to submit BLAST searches. One method uses a RESTful interface and the other uses SOAP interface. In our project we are going to use the RESTful interface. NCBI BLAST is a sequence similarity search program. The emphasis is to find regions of sequence similarity which will yield functional and evolutionary clues about the structure and function of the query sequence. WU-BLAST 10 and NCBI BLAST are distinctly different software packages, although they have a common lineage for some portions of their code. So the two services do their work differently to obtain different results and offer different features. This interface allows submission of BLAST searches for processing at NCBI via an HTTP-based interface. The normal BLAST report is a human readable output that is subject to change with little or no notice. For developers wishing to parse the BLAST output the NCBI makes available ASN.1, XML, and a simplified hit-table. For accessing 3

4 the NCBI QBLAST system a standardized application program interface (API) URLAPI is used. It uses direct HTTP-encoded requests to NCBI web server. Advantages of Using HTTP Requests for the Service: No program should be downloaded from NCBI ftp site to use NCBI BLAST service. Easy to keep backward compatibility of API. No need to transfer sequences from NCBI to local machines. No need to hack Web NCBI BLAST programs to run scripts. Implementation: We wrote this project in Objective-C using the Xcode IDE and the Cocoa Touch framework. This is a Master/Detail Application, allowing for easy selection and/or entry of necessary information for the searches that need to be done. The application allows for selection from a master list of services that the application provides. The selection made determines the input options for the type of search requested. A title and sequence are input, and there are drop-down lists for any other parameters that the search requires. Once the request is specified, it is sent to the REST API, which returns a job identification number. The title and job identification number are stored persistently on the ipad, and populate a table of previous jobs. Once a job is selected from the table, a web view shows the results that have been generated. Testing: Procedure: The testing procedure was quite straightforward. We used test data from http: biochem.uthscsa.edu/~hs_lab/tech/testseqs.html to run various queries both in the EBI web interface and in the ipad application and simply verified that the results were the same. One benefit of returning the data in a web view was that it allowed for a one-toone comparison between results returned from the web application and results returned to the ipad application. Test Data: Test data appears in Appendix A. Results: The project was successful and the immediate goals were reached. We have an intuitive ipad application that allows for specification and submission of NCBI BLAST protein searches. The application also stores previous queries and allows the user to view the results of those previous queries. Testing was successful in all cases, confirming that the project works as planned. 4

5 Future Work: We will continue to work on this project in the future. We intend to implement many other of the available search types soon. This project will be hosted on GitHub 11 and we hope to eventually offer it for free on the itunes App Store 12. The main focus will be the implementation of any search available through a web API from the EBI. Also, we would like to add more functionality in the form of allowing the deletion of previous jobs, personalization of requests and user authorization. Another idea is to allow the export of results in various formats to other applications. References: 1)" 2)" 3)" 4)" 5)" 6)" 7)" 8)" 9) 10) 11) 12) Appendix A: Test Data >nr,nt,month.nt test of blastn from gi 1482 CCAATCTACACACGGGGTAGGGATTACATAGTTCAGGACTTGGGCATAAAAGGCAGAGCAGGGCAGCTGC TGCTTACACTTGCTTTTGACACAACTGTGTTTACTTGCAATCCCCCAAAACAGACAGAATGGTGCATCTG TCCAGTGAGGAGAAGTCTGCGGTCACTGCCCTGTGGGGCAAGGTGAATGTGGAAGAAGTTGGTGGTGAGG CCCTGGGCAGGTTGGTATCCTTTTTACAGCACAACTTAATGAGACAGATAGAAACTGGTCTTGTAGAAAC AGAGTAGTCGCCTGCTTTTCTGCCAGGTGCTGACTTCTCTCCCCTGGGCTGTTTTCATTTTCTCAGGCTG CTGGTTGTCTACCCATGGACCCAGAGGTTCTTCGAGTCCTTTGGGGACCTGTCCTCTGCACATGCTGTTA TGAGCAATCCTAAGGTGAAGGCTCATGGCAAGAAGGTGCTGGCTGCCTTCAGTGAGGGTCTGAATCACCT GGACAACCTCAAAGGCACCTTTGCTAAGCTGAGTGAACTGCACTGTGACAAGCTGCACGTGGATCCTGAG AACTTCAGGGTGAGTTTGGGGACCCTTGATTGTTCTTTCTTTTTCGCTATTGTAAAATTCATGTTATATG GAGGGGGCAAAGTTTTCAGGGTGTTGTTTAGAATGGGAAGATGTCCCTTGTATCACCATGGACCCTCATG ATAATTTTGTTTCTTTCACTTTCTACTCTGTTGACAACCATTGTCTCCTCTTATTTTCTTTTCATTTTCT GTAACTTTTTCGTTAAACTTTAGCTTGCATTTGTAACGAATTTTTAAATTCACTTTTGTTTATTTGTCAG ATTGTAAGTACTTTCTCTAATCACTTTTTTTTCAAGGCAATCAGGGTATATTATATTGTACTTCAGCACA GTTTTAGAGAACAATTGTTATAATTAAATGATAAGGTAGAATATTTCTGCATATAAATTCTGGCTGGCGT GGAAATATTCTTATTGGTAGAAACAACTACACCCTGGTCATCATCCTGCCTTTCTCTTTATGGTTACAAT GATATACACTGTTTGAGATGAGGATAAAATACTCTGAGTCCAAACCGGGCCCCTCTGCTAACCATGTTCA TGCCTTCTTCTCTTTCCTACAGCTCCTGGGCAACGTGCTGGTTGTTGTGCTGTCTCATCATTTTGGCAAA GAATTCACTCCTCAGGTGCAGGCTGCCTATCAGAAGGTGGTGGCTGGTGTGGCCAATGCCCTGGCTCACA AATACCACTGAGATCTTTTTCCCTCTGCCAAAAATTATGGGGACATCATGAAGCCCCTTGAGCATCTGAC TTCTGGCTAATAAAGGAAATTTATTTTCATTGCAATAGTGTGTTGGAATTTTTTGTGTCTCTCACTCGG 5

6 >euk_genomes,nr,est,est_human,htg test of blastn from NG_ (exon 2 Hbb epsilon) actcctcgttgtttacccctg gacccagagattttttgacagctttggaaacctgtcgtctccctctgccatcctgggcaa ccccaaggtcaaggcccatggcaagaaggtgctgacttcctttggagatgctattaaaaa catggacaacctcaagcccgcctttgctaagctgagtgagctgcactgtgacaagctgca tgtggatcctgagaacttcaag >prok_genome test data from gi : Escherichia coli O157:H7, complete genome TCACCCATCGCCAGATAGATTGCGCTGGCACCGCAGATCAGACCAATCCAGCCGGCAAAGTGGATGATTGCGGCGTTACC GGCAATGTTACCGATCGCCAGCAGGGCAAACAGCACGGTCAGGCTAAAGAAAACGAATTGCAGAACGCGTGCGCCTTTCA GCGTGCCGAAGAACATAAACAGCGTAAATACGCCCCACAGACCCAGGTAGACACCAAGGAACTGTGCATTTGGCGCATCG GTCAGACCCAGTTTCGGCATCAGCAGAATCGCAACCAGCGTCAGCCAGAAAGAACCGTAAGAGGTGAATGCGGTTAAACC GAAAGTGTTGCCTTTTTTGTACTCCAGCAGACCAGCAAAAATTTGCGCGATGCCGCCGTAGAAAATGCCCATGGCAAGAA T >nr protein test data from orfg gi ref NP_ hypothetical protein [Vibriophage VpV262] MNTTASDDQNDIPLEDPRLIELREACLHSLWIFAQAVEPHRVYGECHKELFDWWQEMELEEVLNTLALMP RDHQKSHCIAVWVCWQIFKNPAVTIAYVCATESLAILQLYDIKQILTSDEFTRLSPDMIEPMEKKRQKWA ETAIIVDHPIRKKERPRDPTVLATGLDSNNIGAHCNIMVKDDVVIDKNSLTETARQKVEAKAGHLSSILT TDGMEFCVGTRYHPKDHYQTLIDMTEEVWEGDQLVGERPVYAVHTRVVEVEGVFLWPRMARESDGKMFGF DRAQLSRKKAKYRKDMRNFYCQYYNDPNAINEGGIEKSMFLYYDKEKVVRRKGSWWVGKRKVNIIACQDF AYSVQTGSDWTALFILGMDKDKRIYILDIVRYQTKKPSVYWKNLETAYNKWKFKWVRAEAVAAQEVIIEA LREYAEKEQCPIRIKAYKPNSQSGDKETRISQTLEPLYENGDIYHYRGGLCDMLEEELTQDRPPHDDLKD CLHIGVGFDKLKPPVEDDDEEDYDNYHDPHASYSYDPNNRFGGLQ >drosophila,swissprot test data for blastp from gi sp Q01819 CONN_DROME Connectin precursor MATLADSAICFLLLSLLLIGACLVTPTEGRAKDDRRTRGRGSSSGVLSSSSSSSNNMNNGYYSGSSSTAG SSSGYVFTSSSAVNSGSTGYSGPMDSTGFCTRRRDMKLMCYCTPDENHVPVQKAECWVFSEGLHQNDTTW TRFYQQKRLRELKFVIQNNARLDYIPTMIIEPLKNLSSIVIEYSQVEIVKSYAFANLPFLERIILNNNHI MALDQDAFANHIRLRELNLEHNQIFEMDRYAFRNLPLCERLFLNNNNISTLHEGLFADMARLTFLNLAHN QINVLTSEIFRGLGNLNVLKLTRNNLNFIGDTVFAELWSLSELELDDNRIERISERALDGLNTLKTLNLR NNLLKKIDNGLLRGTPALLSINVQANKLETLTFYTFQPIMDNLVNSTSELLVSDNKFICDCRLQWIFELK NRTRHLQLRDSLEDLHCTLQEPKLSHFVDPVPPTILDVLNIGGFTAIGSNSASMGGVGNSVVGSSYSGLT MDDSRKHLGSRSRQALRGQRQFASSAENVVESKMRRRRKRQEEVKEKDLAAVAPAHKRYDYYDDNNGGMS LGHGLDLDDNLSLHKQGFYGAGSPVVGHNDVDVLMTSHSASGDALDILTTKNAIYIKLFLLKPEMLPCHD ELSDPTELPLSRDLMDVRSNVGQDMSTAGANSLAQGMTIIVSLQVALMISRG Appendix B: Source Code BioPadAppDelegate.h BioPad Created by Jason Johnson on 8/8/12. Copyright (c) 2012 JEJSoftware. All rights reserved. #import BioPadAppDelegate : UIResponder (strong, nonatomic) UIWindow *window; BioPadAppDelegate.m BioPad Created by Jason Johnson on 8/8/12. Copyright (c) 2012 JEJSoftware. All rights reserved. 6

7 #import BioPadAppDelegate - (BOOL)application:(UIApplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions Override point for customization after application launch. UISplitViewController *splitviewcontroller = (UISplitViewController *)self.window.rootviewcontroller; UINavigationController *navigationcontroller = [splitviewcontroller.viewcontrollers lastobject]; splitviewcontroller.delegate = (id)navigationcontroller.topviewcontroller; return YES;!!!!!!! - (void)applicationwillresignactive:(uiapplication *)application Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. - (void)applicationdidenterbackground:(uiapplication *)application Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. If your application supports background execution, this method is called instead of applicationwillterminate: when the user quits. - (void)applicationwillenterforeground:(uiapplication *)application Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. - (void)applicationdidbecomeactive:(uiapplication *)application Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - (void)applicationwillterminate:(uiapplication *)application Called when the application is about to terminate. Save data if appropriate. See also applicationdidenterbackground:. BioPadMasterViewController.h BioPad Created by Jason Johnson on 8/8/12. Copyright (c) 2012 JEJSoftware. All rights reserved. #import BioPadMasterViewController : (strong, nonatomic) BioPadDetailViewController *detailviewcontroller; 7

8 BioPadMasterViewController.m BioPad Created by Jason Johnson on 8/8/12. Copyright (c) 2012 JEJSoftware. All rights reserved. #import "BioPadMasterViewController.h" #import BioPadMasterViewController () NSMutableArray BioPadMasterViewController - (void)awakefromnib self.clearsselectiononviewwillappear = NO; self.contentsizeforviewinpopover = CGSizeMake(320.0, 600.0); [super awakefromnib]; - (void)viewdidload [super viewdidload];! Do any additional setup after loading the view, typically from a nib. self.navigationitem.leftbarbuttonitem = self.editbuttonitem; UIBarButtonItem *addbutton = [[UIBarButtonItem alloc] initwithbarbuttonsystemitem:uibarbuttonsystemitemadd target:self action:@selector(insertnewobject:)]; self.navigationitem.rightbarbuttonitem = addbutton; self.detailviewcontroller = (BioPadDetailViewController *) [[self.splitviewcontroller.viewcontrollers lastobject] topviewcontroller]; - (void)viewdidunload [super viewdidunload]; Release any retained subviews of the main view. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation return YES; #pragma mark - Table View - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableview return 1; - (NSInteger)tableView:(UITableView *)tableview numberofrowsinsection:(nsinteger)section return 1; - (BOOL)tableView:(UITableView *)tableview caneditrowatindexpath:(nsindexpath *)indexpath Return NO if you do not want the specified item to be editable. return NO; 8

9 - (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath NSDate *object = [_objects objectatindex:indexpath.row]; self.detailviewcontroller.detailitem = object; BioPadDetailViewController.h BioPad Created by Jason Johnson on 8/8/12. Copyright (c) 2012 JEJSoftware. All rights reserved. #import BioPadDetailViewController : UIViewController (strong, nonatomic) id (weak, nonatomic) IBOutlet UILabel *detaildescriptionlabel; BioPadDetailViewController.m BioPad Created by Jason Johnson on 8/8/12. Copyright (c) 2012 JEJSoftware. All rights reserved. #import BioPadDetailViewController (strong, nonatomic) UIPopoverController *masterpopovercontroller; - BioPadDetailViewController #pragma mark - Managing the detail item - (void)setdetailitem:(id)newdetailitem if (_detailitem!= newdetailitem) _detailitem = newdetailitem; Update the view. [self configureview]; if (self.masterpopovercontroller!= nil) [self.masterpopovercontroller dismisspopoveranimated:yes]; - (void)configureview Update the user interface for the detail item. if (self.detailitem) self.detaildescriptionlabel.text = [self.detailitem description]; - (void)viewdidload [super viewdidload];! Do any additional setup after loading the view, typically from a nib. [self configureview]; 9

10 - (void)viewdidunload [super viewdidunload]; Release any retained subviews of the main view. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation return YES; #pragma mark - Split view - (void)splitviewcontroller:(uisplitviewcontroller *)splitcontroller willhideviewcontroller: (UIViewController *)viewcontroller withbarbuttonitem:(uibarbuttonitem *)barbuttonitem forpopovercontroller:(uipopovercontroller *)popovercontroller barbuttonitem.title = [self.navigationitem setleftbarbuttonitem:barbuttonitem animated:yes]; self.masterpopovercontroller = popovercontroller; - (void)splitviewcontroller:(uisplitviewcontroller *)splitcontroller willshowviewcontroller: (UIViewController *)viewcontroller invalidatingbarbuttonitem:(uibarbuttonitem *)barbuttonitem Called when the view is shown again in the split view, invalidating the button and popover controller. [self.navigationitem setleftbarbuttonitem:nil animated:yes]; self.masterpopovercontroller = nil; BioPadNCBIBLASTViewController.h BioPad Created by Jason Johnson on 8/8/12. Copyright (c) 2012 JEJSoftware. All rights reserved. #import <UIKit/UIKit.h> #import BioPadNCBIBLASTViewController : UIViewController NSMutableData * IBOutlet UITextView * IBOutlet UITextField * IBOutlet UILabel * IBOutlet UILabel * IBOutlet UILabel * IBOutlet UILabel * IBOutlet UILabel * IBOutlet UILabel * IBOutlet UILabel * IBOutlet UILabel * IBOutlet UILabel * IBOutlet UILabel * IBOutlet UILabel * (nonatomic, strong) UIPopoverController * UILabel * (nonatomic, strong) NSString * jobidstring; -(void)getjobid; -(IBAction)setDBLabel:(id)sender; -(IBAction)setProgLabel:(id)sender; -(IBAction)setMatrixLabel:(id)sender; 10

11 -(IBAction)setGapopenLabel:(id)sender; -(IBAction)setGapextendLabel:(id)sender; -(IBAction)setExpthrLabel:(id)sender; -(IBAction)changeFilter:(id)sender; -(IBAction)setDropoffLabel:(id)sender; -(IBAction)setScoresLabel:(id)sender; -(IBAction)setAlignmentLabel:(id)sender; -(IBAction)changeGapalign:(id)sender; -(IBAction)storeJob:(id)sender; BioPadNCBIBLASTViewController.m BioPad Created by Jason Johnson on 8/8/12. Copyright (c) 2012 JEJSoftware. All rights reserved. #import "BioPadNCBIBLASTViewController.h" #import "BioPadBLASTDBTableViewController.h" #import BioPadNCBIBLASTViewController () jobidstring=_jobidstring; - (id)initwithnibname:(nsstring *)nibnameornil bundle:(nsbundle *)nibbundleornil self = [super initwithnibname:nibnameornil bundle:nibbundleornil]; if (self) Custom initialization return self; - (void)viewdidload [[_sequence_text layer] setbordercolor:[[uicolor graycolor] CGColor]]; [[_sequence_text layer] setborderwidth:2.3]; [[_sequence_text layer] setcornerradius:15]; [super viewdidload];! Do any additional setup after loading the view. - (void)viewdidunload [super viewdidunload]; Release any retained subviews of the main view. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 11

12 return YES; -(void)prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender if ([[segue identifier] [[segue identifier] [[segue identifier] [[segue identifier] [[segue identifier] [[segue identifier] [[segue identifier] [[segue identifier] [[segue identifier] UIStoryboardPopoverSegue *popoversegue = (UIStoryboardPopoverSegue *)segue; self.poptablecontroller = popoversegue.popovercontroller; BioPadBLASTDBTableViewController *popovercont = (BioPadBLASTDBTableViewController *)segue.destinationviewcontroller; popovercont.delegate = self; -(void) biopadblastdbtableviewcontrollerdidfinish:(uipopovercontroller *)controller value: (NSString *)value _current_label.text = value; [self.poptablecontroller dismisspopoveranimated:yes]; -(IBAction)setDBLabel:(id)sender _current_label = _database_label; -(IBAction)setProgLabel:(id)sender _current_label = _program_label; -(IBAction)setMatrixLabel:(id)sender _current_label = _matrix_label; -(IBAction)setGapopenLabel:(id)sender _current_label = _gapopen_label; -(IBAction)setGapextendLabel:(id)sender _current_label = _gapextend_label; -(IBAction)setExpthrLabel:(id)sender _current_label = _expthr_label; -(IBAction)changeFilter:(id)sender if ([_filter_label.text isequaltostring:@"no"]) _filter_label.text else _filter_label.text 12

13 -(IBAction)setDropoffLabel:(id)sender _current_label = _dropoff_label; -(IBAction)setScoresLabel:(id)sender _current_label = _scores_label; -(IBAction)setAlignmentLabel:(id)sender _current_label = _alignment_label; -(IBAction)changeGapalign:(id)sender if ([_gapalign_label.text isequaltostring:@"true"]) _gapalign_label.text else _gapalign_label.text -(IBAction)storeJob:(id)sender if (_title_text.text.length == 0 _sequence_text.text.length == 0) UIAlertView *message = [[UIAlertView alloc] initwithtitle:@"incomplete Submission" message:@"you must enter both Title and a Sequence." delegate:nil cancelbuttontitle:@"ok" otherbuttontitles:nil]; [message show]; else [self getjobid]; - (void)getjobid NSString * filter_string; NSString * gapalign_string; NSString * database_string; if ([_filter_label.text isequaltostring:@"yes"]) filter_string else filter_string if ([_gapalign_label.text isequaltostring:@"true"]) gapalign_string else gapalign_string if ([_database_label.text isequaltostring:@"uniprot Knowledgebase"]) database_string else if ([_database_label.text isequaltostring:@"uniprotkb/swiss-prot"]) database_string else if ([_database_label.text isequaltostring:@"uniprotkb/swiss-prot Isoforms"]) database_string else if ([_database_label.text isequaltostring:@"uniprotkb/trembl"]) database_string else database_string 13

14 NSURL *posturl = [NSURL URLWithString:@" run/"]; NSString *params = [[NSString alloc] initwithformat:@"title= %@& =jason@jejsoftware.com&program=%@&matrix=%@&gapopen=%@&gapext=%@&exp=%@&filter= %@&align=0&dropoff=%@&scores=%@&alignments=%@&gapalign=%@&stype=protein&sequence=%@&database=%@", _title_text.text, _program_label.text, _matrix_label.text, _gapopen_label.text, _gapextend_label.text, _expthr_label.text, filter_string, _dropoff_label.text, _scores_label.text, _alignment_label.text, gapalign_string, _sequence_text.text, database_string]; NSMutableURLRequest * therequest=[nsmutableurlrequest requestwithurl:posturl cachepolicy:nsurlrequestuseprotocolcachepolicy timeoutinterval:30.0]; [therequest sethttpmethod:@"post"]; [therequest sethttpbody:[params datausingencoding:nsutf8stringencoding]]; NSURLConnection * theconnection=[[nsurlconnection alloc] initwithrequest:therequest delegate:self]; if (theconnection) jobdata = [NSMutableData data]; CFRunLoopRun(); else CFRunLoopRun(); NSUserDefaults *userdefault=[nsuserdefaults standarduserdefaults]; NSData * mydecodedobject; NSMutableArray * job_data; if ([userdefault objectforkey: [NSString stringwithformat:@"pbjob"]] == NULL) job_data = [[NSMutableArray alloc]init]; else mydecodedobject = [userdefault objectforkey: [NSString stringwithformat:@"pbjob"]]; job_data =[NSKeyedUnarchiver unarchiveobjectwithdata: mydecodedobject]; BioPadProteinBLASTJob * blast_job = [[BioPadProteinBLASTJob alloc] init]; blast_job.title = _title_text.text; blast_job.job_id = _jobidstring; [job_data addobject:blast_job]; NSData * myencodedobject = [NSKeyedArchiver archiveddatawithrootobject:job_data]; [userdefault setobject:myencodedobject forkey:[nsstring stringwithformat:@"pbjob"]]; [userdefault synchronize]; UIAlertView *message = [[UIAlertView alloc] initwithtitle:@"job Submitted" message:@"your job has been successfully submitted. Choose the \"Check Job Status\" button to see the results." delegate:nil cancelbuttontitle:@"ok" otherbuttontitles:nil]; [message show]; - (void)connection:(nsurlconnection *)connection didreceiveresponse:(nsurlresponse *)response [jobdata setlength:0]; - (void)connection:(nsurlconnection *)connection didreceivedata:(nsdata *)data [jobdata appenddata:data]; _jobidstring = [[NSString alloc] initwithdata:jobdata encoding:nsutf8stringencoding]; 14

15 - (void)connectiondidfinishloading:(nsurlconnection *)connection CFRunLoopStop(CFRunLoopGetCurrent()); - (void)connection:(nsurlconnection *)connection didfailwitherror:(nserror *)error NSString * errormessage = [[NSString alloc] initwithformat:@"[\"error\",\"%@\"]",[error localizeddescription]]; _jobidstring = errormessage; CFRunLoopStop(CFRunLoopGetCurrent()); - (BOOL)connection:(NSURLConnection *)connection canauthenticateagainstprotectionspace: (NSURLProtectionSpace *)protectionspace return [protectionspace.authenticationmethod isequaltostring:nsurlauthenticationmethodservertrust]; - (void)connection:(nsurlconnection *)connection didreceiveauthenticationchallenge: (NSURLAuthenticationChallenge *)challenge [challenge.sender usecredential:[nsurlcredential credentialfortrust:challenge.protectionspace.servertrust] forauthenticationchallenge:challenge]; [challenge.sender continuewithoutcredentialforauthenticationchallenge:challenge]; BioPadBLASTDBTableViewController.h BioPad Created by Jason Eric Johnson on 8/8/12. Copyright (c) 2012 JEJSoftware. All rights reserved. #import BioPadBLASTDBTableViewController : (weak, nonatomic) id <BioPadBLASTDBTableViewControllerDelegate> BioPadBLASTDBTableViewControllerDelegate <NSObject> -(void) biopadblastdbtableviewcontrollerdidfinish:(uipopovercontroller *)controller value: (NSString *)value; BioPadBLASTDBTableViewController.m BioPad Created by Jason Eric Johnson on 8/8/12. Copyright (c) 2012 JEJSoftware. All rights reserved. #import "BioPadBLASTDBTableViewController.h" #import BioPadBLASTDBTableViewController delegate = _delegate; 15

16 - (id)initwithstyle:(uitableviewstyle)style self = [super initwithstyle:style]; if (self) Custom initialization return self; - (void)viewdidload [super viewdidload]; Uncomment the following line to preserve selection between presentations. self.clearsselectiononviewwillappear = NO; Uncomment the following line to display an Edit button in the navigation bar for this view controller. self.navigationitem.rightbarbuttonitem = self.editbuttonitem; - (void)viewdidunload [super viewdidunload]; Release any retained subviews of the main view. e.g. self.myoutlet = nil; - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation return YES; #pragma mark - Table view data source #pragma mark - Table view delegate - (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath UITableViewCell *selectedcell = [tableview cellforrowatindexpath:indexpath]; NSString *celltext = selectedcell.textlabel.text; [self.delegate biopadblastdbtableviewcontrollerdidfinish:(uipopovercontroller *)self.parentviewcontroller value:celltext]; BioPadBLASTJobTableViewController.h BioPad Created by Jason Eric Johnson on 8/9/12. Copyright (c) 2012 JEJSoftware. All rights reserved. #import <UIKit/UIKit.h> #import BioPadBLASTJobTableViewController : UITableViewController NSMutableArray * (nonatomic, strong) NSString * selected_job; BioPadBLASTJobTableViewController.m 16

17 BioPad Created by Jason Eric Johnson on 8/9/12. Copyright (c) 2012 JEJSoftware. All rights reserved. #import "BioPadBLASTJobTableViewController.h" #import BioPadBLASTJobTableViewController selected_job=_selected_job; - (id)initwithstyle:(uitableviewstyle)style self = [super initwithstyle:style]; if (self) Custom initialization return self; - (void)viewdidload NSUserDefaults * userdefault=[nsuserdefaults standarduserdefaults]; NSData * mydecodedobject = [userdefault objectforkey: [NSString stringwithformat:@"pbjob"]]; decodedarray =[NSKeyedUnarchiver unarchiveobjectwithdata: mydecodedobject]; [self insertnewobject:nil]; [super viewdidload]; Uncomment the following line to preserve selection between presentations. self.clearsselectiononviewwillappear = NO; Uncomment the following line to display an Edit button in the navigation bar for this view controller. self.navigationitem.rightbarbuttonitem = self.editbuttonitem; - (void)viewdidunload [super viewdidunload]; Release any retained subviews of the main view. e.g. self.myoutlet = nil; - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation return YES; #pragma mark - Table view data source - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableview return 1; - (NSInteger)tableView:(UITableView *)tableview numberofrowsinsection:(nsinteger)section return decodedarray.count; - (UITableViewCell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath static NSString * CellIdentifier UITableViewCell * cell = [tableview dequeuereusablecellwithidentifier:cellidentifier]; 17

18 BioPadProteinBLASTJob * job = [decodedarray objectatindex:indexpath.row]; cell.textlabel.text = job.title; cell.detailtextlabel.text = job.job_id; return cell; - (void)insertnewobject:(id)sender NSIndexPath *indexpath = [NSIndexPath indexpathforrow:0 insection:0]; [self.tableview insertrowsatindexpaths:@[indexpath] withrowanimation:uitableviewrowanimationautomatic]; -(void) prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender if ([[segue identifier] isequaltostring:@"showpbresults"]) BioPadBLASTJobResultsViewViewController * bpvc = (BioPadBLASTJobResultsViewViewController*)segue.destinationViewController; BioPadProteinBLASTJob * job = [decodedarray objectatindex:[self.tableview indexpathforselectedrow].row]; bpvc.job_string = job.job_id; BioPadBLASTJobResultsViewViewController.h BioPad Created by Jason Eric Johnson on 8/10/12. Copyright (c) 2012 JEJSoftware. All rights reserved. #import BioPadBLASTJobResultsViewViewController : (nonatomic, strong) IBOutlet UIWebView * (nonatomic, strong) NSString * job_string; BioPadBLASTJobResultsViewViewController.m BioPad Created by Jason Eric Johnson on 8/10/12. Copyright (c) 2012 JEJSoftware. All rights reserved. #import BioPadBLASTJobResultsViewViewController web_view=_web_view; - (id)initwithnibname:(nsstring *)nibnameornil bundle:(nsbundle *)nibbundleornil self = [super initwithnibname:nibnameornil bundle:nibbundleornil]; if (self) Custom initialization return self; 18

19 - (void)viewdidload NSURL *url = [NSURL URLWithString:[NSString stringwithformat:@" services/web/blastresult.ebi?tool=ncbiblast&jobid=%@&context=protein", _job_string]]; NSMutableURLRequest *requesturl = [NSMutableURLRequest requestwithurl:url]; [_web_view loadrequest:requesturl]; [super viewdidload];! Do any additional setup after loading the view. - (void)viewdidunload [super viewdidunload]; Release any retained subviews of the main view. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation return YES; BioPadProteinBLASTJob.h BioPad Created by Jason Eric Johnson on 8/10/12. Copyright (c) 2012 JEJSoftware. All rights reserved. #import BioPadProteinBLASTJob : (nonatomic, strong) NSString * (nonatomic, strong) NSString * job_id; BioPadProteinBLASTJob.m BioPad Created by Jason Eric Johnson on 8/10/12. Copyright (c) 2012 JEJSoftware. All rights reserved. #import job_id=_job_id; - (void)encodewithcoder:(nscoder *)encoder [encoder encodeobject:_title forkey:@"title"]; [encoder encodeobject:_job_id forkey:@"jobid"]; - (id)initwithcoder:(nscoder *)decoder self = [super init]; if( self!= nil ) _title = [decoder decodeobjectforkey:@"title"]; _job_id = [decoder decodeobjectforkey:@"jobid"]; return self; 19

Produced by. Design Patterns. MSc in Computer Science. Eamonn de Leastar

Produced by. Design Patterns. MSc in Computer Science. Eamonn de Leastar Design Patterns MSc in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie

More information

src3/bettertextfield/bettertextfield/appdelegate.h // AppDelegate.h // BetterTextField

src3/bettertextfield/bettertextfield/appdelegate.h // AppDelegate.h // BetterTextField src3/bettertextfield/bettertextfield/appdelegate.h 1 1 1 1 AppDelegate.h BetterTextField Created by Tommy MacWilliam on 3/7/ Copyright (c) 2012 MyCompanyName. All rights reserved. #import

More information

Praktikum Entwicklung von Mediensystemen mit

Praktikum Entwicklung von Mediensystemen mit Praktikum Entwicklung von Mediensystemen mit Wintersemester 2013/2014 Christian Weiß, Dr. Alexander De Luca Today Table View Navigation Controller Passing Data Between Scenes Assignment 2 2 Navigation-based

More information

Navigation bar (Xcode version 4.5.2) 1. Create a new project. From the Xcode menu, select File > New > Project

Navigation bar (Xcode version 4.5.2) 1. Create a new project. From the Xcode menu, select File > New > Project Navigation bar (Xcode version 4.5.2) 1. Create a new project. From the Xcode menu, select File > New > Project Choose the Single View Application template Click Next. In the Choose options for your new

More information

imate: ios Application

imate: ios Application imate: ios Application Document Version 1.0.1 Date: 27 th May, 2014 2 [IMATE: IOS APPLICATION] Contents AppDelegate Class Reference... 4 Tasks... 4 Properties... 4 Instance Methods... 4 ChatMenuViewController

More information

ios Mobile Development

ios Mobile Development ios Mobile Development Today UITableView! Data source-driven vertical list of views.! ipad! Device-specific UI idioms.! Demo! Shutterbug UITableView Very important class for displaying data in a table!

More information

ITP 342 Mobile App Dev. Table Views

ITP 342 Mobile App Dev. Table Views ITP 342 Mobile App Dev Table Views Table Views The most common mechanism used to display lists of data to the user Highly configurable objects that can be made to look practically any way you want them

More information

IPHONE DEVELOPMENT. Getting Started with the iphone SDK

IPHONE DEVELOPMENT. Getting Started with the iphone SDK IPHONE DEVELOPMENT Getting Started with the iphone SDK OBJECTIVE-C The Big Picture STRICT SUPERSET OF C The Objective C Language Any C stuff applies Standard libs are here (time, sqrt etc) The C Language

More information

COPYRIGHTED MATERIAL. part I Developing a Professional UI. Chapter 1: Creating a Personal Library. Chapter 2: Advancing with Tableviews

COPYRIGHTED MATERIAL. part I Developing a Professional UI. Chapter 1: Creating a Personal Library. Chapter 2: Advancing with Tableviews part I Developing a Professional UI Chapter 1: Creating a Personal Library Chapter 2: Advancing with Tableviews Chapter 3: Advancing with Map Kit Chapter 4: Understanding Action Views and Alerts Chapter

More information

Stanford CS193p. Developing Applications for ios. Fall Stanford CS193p. Fall 2011

Stanford CS193p. Developing Applications for ios. Fall Stanford CS193p. Fall 2011 Developing Applications for ios Today UI Element of the Week UIToolbar ipad Split View Popover Universal (iphone + ipad) Application Demo Friday Section AVFoundation framework - Capturing and manipulating

More information

Data IAP 2010 iphonedev.csail.mit.edu edward benson / Thursday, January 14, 2010

Data IAP 2010 iphonedev.csail.mit.edu edward benson / Thursday, January 14, 2010 Data IAP 2010 iphonedev.csail.mit.edu edward benson / eob@csail.mit.edu Today Property Lists User Defaults Settings Panels CoreData Property Lists Today Add persistence. plist 1. Using Property Lists in

More information

Apple Development Technology Workshops

Apple Development Technology Workshops Apple Development Technology Workshops Workshop 10 Table Views Building iphone Apps. Pt 2 Fall 2008 Hafez Rouzati Fall 2008 Zach Pousman Last Week UIViewControllers Organizing Content & Building iphone

More information

Today s Topics. Scroll views Table views. UITableViewController Table view cells. Displaying data Controlling appearance & behavior

Today s Topics. Scroll views Table views. UITableViewController Table view cells. Displaying data Controlling appearance & behavior Today s Topics Scroll views Table views Displaying data Controlling appearance & behavior UITableViewController Table view cells Scroll Views UIScrollView For displaying more content than can fit on the

More information

Integrating Game Center into a BuzzTouch 1.5 app

Integrating Game Center into a BuzzTouch 1.5 app into a BuzzTouch 1.5 app This tutorial assumes you have created your app and downloaded the source code; created an App ID in the ios Provisioning Portal, and registered your app in itunes Connect. Step

More information

Naviga&on and Tab Bar Controllers and Table View

Naviga&on and Tab Bar Controllers and Table View Naviga&on and Tab Bar Controllers and Table View UINaviga)onController Stack of view controllers Naviga)on bar How It Fits Together Top view controller s view Top view controller s )tle Previous view controller

More information

News- ipad: ios(swift) Application

News- ipad: ios(swift) Application News- ipad: ios(swift) Application Document Version 1.0.1 Date: 9 th Nov, 2014 2 [NEWS- IPAD: APP DOCUMENTATION] Important Notes:... 6 AppDelegate Class Reference... 7 Tasks... 7 Instance Methods... 7

More information

CS193P - Lecture 8. iphone Application Development. Scroll Views & Table Views

CS193P - Lecture 8. iphone Application Development. Scroll Views & Table Views CS193P - Lecture 8 iphone Application Development Scroll Views & Table Views Announcements Presence 1 due tomorrow (4/28)! Questions? Presence 2 due next Tuesday (5/5) Announcements Enrolled students who

More information

Life Cycle. Chapter Explore the Game Application. Understanding the Views in a Game

Life Cycle. Chapter Explore the Game Application. Understanding the Views in a Game 3 Chapter Explore the Game Application Life Cycle There is more to a game than just the fun parts. Almost all of the games on the market, and definitely the big titles, involve multiple views and a reasonably

More information

From Hello World to Finished App. raywenderlich.com

From Hello World to Finished App. raywenderlich.com From Hello World to Finished App Why Learn ios? - Strong demand - Motivating - App Store - It s fun! What s This All About? - One Day Crash Course - For beginners & intermediates - Making apps with UIKit

More information

ITP 342 Mobile App Dev. Table Views

ITP 342 Mobile App Dev. Table Views ITP 342 Mobile App Dev Table Views Tables A table presents data as a scrolling, singlecolumn list of rows that can be divided into sections or groups. Use a table to display large or small amounts of information

More information

lectures/2/src2/nib1/nib1/appdelegate.h // AppDelegate.h // Nib1 // David J. Malan // Harvard University //

lectures/2/src2/nib1/nib1/appdelegate.h // AppDelegate.h // Nib1 // David J. Malan // Harvard University // lectures/2/src2/nib1/nib1/appdelegate.h 1 1 1 1 1 1 1 1 1 2 AppDelegate.h Nib1 David J. Malan Harvard University malan@harvard.edu Demonstrates a Single View Application implemented with a nib, plus IBAction

More information

Document Version Date: 1st March, 2015

Document Version Date: 1st March, 2015 7 Minute Fitness: ios(swift) Application Document Version 1.0.1 Date: 1st March, 2015 2 [7 MINUTE FITNESS: APP DOCUMENTATION] Important Notes:... 5 AppDelegate Class Reference... 6 Tasks... 6 Instance

More information

Detailed Design Specification

Detailed Design Specification Department of Computer Science and Engineering the University of Texas at Arlington Detailed Design Specification BehindtheCurtain Enterprises Project Team Members: Kyle Burgess Kyle Crumpton Austen Herbst

More information

Tables. Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder

Tables. Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder Tables Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder Mobile Application Development in ios 1 Outline Table View Controller Table View Table Cells

More information

Designing iphone Applications

Designing iphone Applications Designing iphone Applications 4 Two Flavors of Mail 5 Organizing Content 6 Organizing Content 6 Organizing Content 6 Organizing Content 6 Organizing Content Focus on your user s data 6 Organizing Content

More information

Multitasking and Background Execution

Multitasking and Background Execution Multitasking and Background Execution Fall, 2012 Prof. Massimiliano "Max" Pala pala@nyu.edu Introduction Spawning Threads and Tasks Background Execution User hits 'home' button the app is sent in the background

More information

AVAudioPlayer. avtouch Application

AVAudioPlayer. avtouch Application AVAudioPlayer avtouch Application iphone Application Index 1. iphone Application 1) iphone Application 2) iphone Application Main Method 3) iphone Application nib(.xib) 2. avtouch Application 1) avtouch

More information

Introductory ios Development

Introductory ios Development Introductory ios Development 152-164 Unit 5 - Multi-View Apps Quick Links & Text References What is a Delegate? What is a Protocol? Delegates, Protocols and TableViews Creating a Master-Detail App Modifying

More information

User Experience: Windows & Views

User Experience: Windows & Views View Controller Programming Guide for ios User Experience: Windows & Views 2011-01-07 Apple Inc. 2011 Apple Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval

More information

iphone Programming Touch, Sound, and More! Norman McEntire Founder Servin Flashlight CodeTour TouchCount CodeTour

iphone Programming Touch, Sound, and More! Norman McEntire Founder Servin Flashlight CodeTour TouchCount CodeTour iphone Programming Touch, Sound, and More! Norman McEntire Founder Servin 1 Legal Info iphone is a trademark of Apple Inc. Servin is a trademark of Servin Corporation 2 Welcome Welcome! Thank you! My promise

More information

View Controller Lifecycle

View Controller Lifecycle View Controller Lifecycle View Controllers have a Lifecycle A sequence of messages is sent to them as they progress through it Why does this matter? You very commonly override these methods to do certain

More information

Computer Science 251. iphone Application Development. Autorotation, Popover Controllers, Modal Controllers

Computer Science 251. iphone Application Development. Autorotation, Popover Controllers, Modal Controllers Computer Science 251 iphone Application Development Autorotation, Popover Controllers, Modal Controllers Two Types of Orientation Device: physically upside down, rotated left, on its back, etc. Can be

More information

IOS - TEXT FIELD. Use of Text Field. Important Properties of Text Field. Updating Properties in xib

IOS - TEXT FIELD. Use of Text Field. Important Properties of Text Field. Updating Properties in xib IOS - TEXT FIELD http://www.tutorialspoint.com/ios/ios_ui_elements_text_field.htm Copyright tutorialspoint.com Use of Text Field A text field is a UI element that enables the app to get user input. A UITextfield

More information

Lab #1: Chuck Norris Joke Generator Class

Lab #1: Chuck Norris Joke Generator Class Lab #1: Chuck Norris Joke Generator Class Chuck Norris does not need Twitter... he is already following you. Chuck Norris doesn t flush the toilet, he scares the sh*t out of it. Chuck Norris is the reason

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer About the Tutorial ios is a mobile operating system developed and distributed by Apple Inc. It was originally released in 2007 for the iphone, ipod Touch, and Apple TV. ios is derived from OS X, with which

More information

epicurious Anatomy of an ios app Robert Tolar Haining June 25, 2010 ConvergeSE

epicurious Anatomy of an ios app Robert Tolar Haining June 25, 2010 ConvergeSE epicurious Anatomy of an ios app Robert Tolar Haining June 25, 2010 ConvergeSE + = Prototype iphone ipad Why iphone apps Simplicity Control Speed Revenue Epicurious Defined as a Recipe Utility Cookbook

More information

AVAudioRecorder & System Sound Services

AVAudioRecorder & System Sound Services AVAudioRecorder & System Sound Services Dept. of Multimedia Science, Sookmyung Women s University. prof. JongWoo Lee Index AVAudioRecorder? - (AudioRecorder) System Sound Service? - (SysSound) AVAudioRecorder

More information

Social Pinboard: ios(swift) Application

Social Pinboard: ios(swift) Application Social Pinboard: ios(swift) Application Document Version 1.0.1 Date: 15 th May, 2015 2 [SOCIAL PINBOARD: APP DOCUMENTATION] Important Notes:... 5 AppDelegate Class Reference... 6 Tasks... 6 Instance Methods...

More information

iphone App Basics iphone and ipod touch Development Fall 2009 Lecture 5

iphone App Basics iphone and ipod touch Development Fall 2009 Lecture 5 iphone App Basics iphone and ipod touch Development Fall 2009 Lecture 5 Questions? Announcements Assignment #1 due this evening by 11:59pm Remember, if you wish to use a free late you must email me before

More information

View Controllers CPRE 388

View Controllers CPRE 388 View Controllers CPRE 388 View Controllers Manage views in model view controller design template. Many types: custom view controller; container view controller; modal view controller. Custom View controllers

More information

InterfaceBuilder and user interfaces

InterfaceBuilder and user interfaces ES3 Lab 2 InterfaceBuilder and user interfaces This lab InterfaceBuilder Creating components Linking them to your code Adding buttons, labels, sliders UITableView Creating a tableview Customizing cells

More information

COSC$4355/6355$ $Introduction$to$Ubiquitous$Computing$ Exercise$3$ September!17,!2015!

COSC$4355/6355$ $Introduction$to$Ubiquitous$Computing$ Exercise$3$ September!17,!2015! COSC4355/6355 IntroductiontoUbiquitousComputing Exercise3 September17,2015 Objective Inthisexercise,youwilllearnhowtowriteunittestsforyourapplicationandalsohowtouse NSUserDefaults.WewillalsoimplementObjectiveCCcategories*welearntlastweek.

More information

Your First ios 7 App. Everything you need to know to build and submit your first ios app. Ash Furrow

Your First ios 7 App. Everything you need to know to build and submit your first ios app. Ash Furrow Your First ios 7 App Everything you need to know to build and submit your first ios app. Ash Furrow This book is for sale at http://leanpub.com/your-first-ios-app This version was published on 2014-09-13

More information

ITP 342 Mobile App Dev. Web View

ITP 342 Mobile App Dev. Web View ITP 342 Mobile App Dev Web View Web View 2 WebKit The WebKit provides a set of core classes to display web content in windows, and by default, implements features such as following links clicked by the

More information

OVERVIEW. Why learn ios programming? Share first-hand experience. Identify platform differences. Identify similarities with.net

OVERVIEW. Why learn ios programming? Share first-hand experience. Identify platform differences. Identify similarities with.net OVERVIEW Why learn ios programming? Share first-hand experience. Identify platform differences. Identify similarities with.net Microsoft MVP for 4 years C#, WinForms, WPF, Silverlight Joined Cynergy about

More information

ios Core Data Example Application

ios Core Data Example Application ios Core Data Example Application The Core Data framework provides an abstract, object oriented interface to database storage within ios applications. This does not require extensive knowledge of database

More information

CS193P - Lecture 7. iphone Application Development. Navigation & Tab Bar Controllers

CS193P - Lecture 7. iphone Application Development. Navigation & Tab Bar Controllers CS193P - Lecture 7 iphone Application Development Navigation & Tab Bar Controllers 1 Announcements Assignment 3 is due tomorrow Paparazzi 1 is due on Wednesday February 3rd 2 Today s Topics Navigation

More information

ITP 342 Mobile App Development. Data Persistence

ITP 342 Mobile App Development. Data Persistence ITP 342 Mobile App Development Data Persistence Persistent Storage Want our app to save its data to persistent storage Any form of nonvolatile storage that survives a restart of the device Want a user

More information

SDK Quick Start Guide

SDK Quick Start Guide SDK Quick Start Guide Index Requirements...3 Required Frameworks...3 Project Target Build Settings...4 AppDelegate sub- classing...4 Using the Low Level API...6 C2CallPhone Base class for low- level C2Call

More information

Chapter 22 TableView TableView. TableView ios. ViewController. Cell TableViewCell TableView

Chapter 22 TableView TableView. TableView ios. ViewController. Cell TableViewCell TableView Chapter 22 TableView TableView Android TableView ListView App 22.1 TableView TableView Storyboard Table View ViewController TableView ios Cell TableViewCell TableView Table View Cell Cell ImageView (imageview)

More information

Intro to Native ios Development. Dave Koziol Arbormoon Software, Inc.

Intro to Native ios Development. Dave Koziol Arbormoon Software, Inc. Intro to Native ios Development Dave Koziol Arbormoon Software, Inc. About Me Long time Apple Developer (20 WWDCs) Organizer Ann Arbor CocoaHeads President & ios Developer at Arbormoon Software Inc. Wunder

More information

Developing Applications for ios

Developing Applications for ios Developing Applications for ios Lecture 7: View Controller Lifecycle and UIKit Radu Ionescu raducu.ionescu@gmail.com Faculty of Mathematics and Computer Science University of Bucharest Content View Controller

More information

Stanford CS193p. Developing Applications for iphone 4, ipod Touch, & ipad Fall Stanford CS193p Fall 2010

Stanford CS193p. Developing Applications for iphone 4, ipod Touch, & ipad Fall Stanford CS193p Fall 2010 Developing Applications for iphone 4, ipod Touch, & ipad Today More Core Data What does the code for the custom NSManagedObject subclasses generated by Xcode look like? Querying for (fetching) objects

More information

Lab #1: Chuck Norris Joke Generator Class

Lab #1: Chuck Norris Joke Generator Class Lab #1: Chuck Norris Joke Generator Class Chuck Norris does not need Twitter... he is already following you. Chuck Norris doesnʼt flush the toilet, he scares the sh*t out of it. Chuck Norris is the reason

More information

Index. btndrop function, 224, 226 btngetquote function, 246 btnpressed function, 28 btnquote method, 245. CallWeb method, 238, 240

Index. btndrop function, 224, 226 btngetquote function, 246 btnpressed function, 28 btnquote method, 245. CallWeb method, 238, 240 Index A App icons section icons set, 277 LaunchImage, 278 launch screen graphics, 278 279 PNG format, 277 settings, 276 App store deployment application graphics, 273 general settings Identity section,

More information

Create an App that will drop PushPins onto a map based on addresses that the user inputs.

Create an App that will drop PushPins onto a map based on addresses that the user inputs. Overview Create an App that will drop PushPins onto a map based on addresses that the user inputs. Part 1: Introduction to MKMapKit Part 2: Introduction to PushPins Part 3: Use Google s API to lookup an

More information

Coding Conventions Objective-C coding conventions and styling Jens Willy Johannsen

Coding Conventions Objective-C coding conventions and styling Jens Willy Johannsen Coding Conventions Objective-C coding conventions and styling 22-06-2012 Jens Willy Johannsen jens@greenerpastures.dk Greener Pastures Change log... 4 Revision 3 (2012-06-22)... 4 Revision 2... 4 Comments...

More information

View Concepts. iphone Application Programming Lecture 4: User Interface Design. SDK provide many types of Views to show your content

View Concepts. iphone Application Programming Lecture 4: User Interface Design. SDK provide many types of Views to show your content View Concepts iphone Application Programming Lecture 4: User Interface Design SDK provide many types of Views to show your content At run-time Views are organized as a tree Chat Wacharamanotham Media Computing

More information

Enhancing your apps for the next dimension of touch

Enhancing your apps for the next dimension of touch App Frameworks #WWDC16 A Peek at 3D Touch Enhancing your apps for the next dimension of touch Session 228 Tyler Fox UIKit Frameworks Engineer Peter Hajas UIKit Frameworks Engineer 2016 Apple Inc. All rights

More information

Building GUIs with UIKit. Kevin Cathey

Building GUIs with UIKit. Kevin Cathey Building GUIs with UIKit Kevin Cathey Building GUIs with UIKit acm.uiuc.edu/macwarriors/devphone Building GUIs with UIKit What is UIKit? acm.uiuc.edu/macwarriors/devphone Building GUIs with UIKit What

More information

My First iphone App (for Xcode version 6.4)

My First iphone App (for Xcode version 6.4) My First iphone App (for Xcode version 6.4) 1. Tutorial Overview In this tutorial, you re going to create a very simple application on the iphone or ipod Touch. It has a text field, a label, and a button

More information

Collection Views. Dr. Sarah Abraham

Collection Views. Dr. Sarah Abraham Collection Views Dr. Sarah Abraham University of Texas at Austin CS329e Fall 2016 What is a Collection View? Presents an ordered set of data items in a flexible layout Subclass of UIScrollView (like UITableView)

More information

ITP 342 Mobile App Development. Data Persistence

ITP 342 Mobile App Development. Data Persistence ITP 342 Mobile App Development Data Persistence Persistent Storage Want our app to save its data to persistent storage Any form of nonvolatile storage that survives a restart of the device Want a user

More information

Why Model-View-Controller?

Why Model-View-Controller? View Controllers Why Model-View-Controller? Ever used the word spaghetti to describe code? Clear responsibilities make things easier to maintain Avoid having one monster class that does everything Why

More information

Praktikum Entwicklung von Mediensystemen mit ios

Praktikum Entwicklung von Mediensystemen mit ios Praktikum Entwicklung von Mediensystemen mit ios WS 2011 Prof. Dr. Michael Rohs michael.rohs@ifi.lmu.de MHCI Lab, LMU München Today Storyboards Automatic Reference Counting Animations Exercise 3 2 Timeline

More information

Files & Archiving. Lecture 8

Files & Archiving. Lecture 8 Files & Archiving Lecture 8 Persistent Data NSUserDefaults Dead simple to use Just one big file Only supports property list types What if you want more features? File Tasks Finding the file path User selected

More information

Mobile Application Development

Mobile Application Development Mobile Application Development Lecture 16 Controllers of View Controllers 2013/2014 Parma Università degli Studi di Parma Lecture Summary Multiple MVCs UINavigationController Segues UITabBarController

More information

ITP 342 Advanced Mobile App Dev. Core Data

ITP 342 Advanced Mobile App Dev. Core Data ITP 342 Advanced Mobile App Dev Core Data Persistent Data NSUser Defaults Typically used to save app preferences Property List (plist) in Documents Directory Data is in a dictionary or an array Coders

More information

MVC and Interface Builder IAP 2010

MVC and Interface Builder IAP 2010 MVC and Interface Builder IAP 2010 iphonedev.csail.mit.edu edward benson / eob@csail.mit.edu Information-Driven Applications Application Flow UIApplication Main NIB Initialized UIAppDelegate - (void)applicationdidfinishlaunching:(uiapplication

More information

Advanced ios. CSCI 4448/5448: Object-Oriented Analysis & Design Lecture 20 11/01/2012

Advanced ios. CSCI 4448/5448: Object-Oriented Analysis & Design Lecture 20 11/01/2012 Advanced ios CSCI 4448/5448: Object-Oriented Analysis & Design Lecture 20 11/01/2012 1 Goals of the Lecture Present a few additional topics and concepts related to ios programming persistence serialization

More information

APP. ios. Construction Strategy and Main Technology of the Mobile Library APP Take ios for Instance. 2 ios. ios. UI MVC ios APP G250 APP

APP. ios. Construction Strategy and Main Technology of the Mobile Library APP Take ios for Instance. 2 ios. ios. UI MVC ios APP G250 APP 224 2012 9 * APP ios 1 2 1 1 361005 2 100080 ios UI APP API XML MVC ios APP G250 Construction Strategy and Main Technology of the Mobile Library APP Take ios for Instance Chen Junjie 1 2 Huang Guofan 1

More information

Learning ios 8 for Enterprise

Learning ios 8 for Enterprise Learning ios 8 for Enterprise Design and develop stunning ios applications for business environments Mayank Birani BIRMINGHAM - MUMBAI Learning ios 8 for Enterprise Copyright 2014 Packt Publishing All

More information

Mobile Application Development L12: Storage & Communication

Mobile Application Development L12: Storage & Communication Mobile Application Development L12: Storage & Communication Jonathan Diehl (Informatik 10) Hendrik Thüs (Informatik 9) Data Storage & Communication Serialization & File Management SQLite Database CoreData

More information

Lecture 8 Demo Code: Cassini Multithreading

Lecture 8 Demo Code: Cassini Multithreading Lecture 8 Demo Code: Cassini Multithreading Objective Included below is the source code for the demo in lecture. It is provided under the same Creative Commons licensing as the rest of CS193p s course

More information

Contents. iphone Training. Industry Trainers. Classroom Training Online Training ON-DEMAND Training. Read what you need

Contents. iphone Training. Industry Trainers. Classroom Training Online Training ON-DEMAND Training. Read what you need iphone Training Contents About iphone Training Our ios training classes can help you get off to a running start in iphone, ipod and ipad app development. Learn from expert Objective-C developers with years

More information

Stanford CS193p. Developing Applications for ios. Fall Stanford CS193p. Fall 2011

Stanford CS193p. Developing Applications for ios. Fall Stanford CS193p. Fall 2011 Developing Applications for ios Today Persistence How to make things stick around between launchings of your app (besides NSUserDefaults) Persistence Property Lists Use writetourl:atomically: and initwithcontentsofurl:

More information

AdFalcon ios SDK Developer's Guide. AdFalcon Mobile Ad Network Product of Noqoush Mobile Media Group

AdFalcon ios SDK Developer's Guide. AdFalcon Mobile Ad Network Product of Noqoush Mobile Media Group AdFalcon ios SDK 4.1.0 Developer's Guide AdFalcon Mobile Ad Network Product of Noqoush Mobile Media Group Table of Contents 1 Introduction... 3 Prerequisites... 3 2 Install AdFalcon SDK... 4 2.1 Use CocoaPods

More information

Step 1: Open Xcode and select Create a new Xcode Project from the Welcome to Xcode menu.

Step 1: Open Xcode and select Create a new Xcode Project from the Welcome to Xcode menu. In this tutorial we are going to build a simple calculator using buttons that are all linked together using the same method. We will also add our own method to the source code to create some additional

More information

MVC & Onwards. CS 442: Mobile App Development Michael Saelee

MVC & Onwards. CS 442: Mobile App Development Michael Saelee MVC & Onwards CS 442: Mobile App Development Michael Saelee Agenda - Recap: view-controller communication - Delegation as a general pattern - Observer pattern - Controller responsibilities & MVC - Multiple

More information

ITP 342 Advanced Mobile App Dev. Memory

ITP 342 Advanced Mobile App Dev. Memory ITP 342 Advanced Mobile App Dev Memory Memory Management Objective-C provides two methods of application memory management. 1. In the method described in this guide, referred to as manual retain-release

More information

Review. Objective-C Classes, Methods, Properties, Protocols, Delegation, Memory Management

Review. Objective-C Classes, Methods, Properties, Protocols, Delegation, Memory Management Data Persistence Review Objective-C Classes, Methods, Properties, Protocols, Delegation, Memory Management Foundation NSArray, NSDictionary, NSString (and mutable versions thereof) MVC and UIViewController

More information

Mobile Apps 2010 iphone and Android

Mobile Apps 2010 iphone and Android Mobile Apps 2010 iphone and Android March 9, 2010 Norman McEntire, Founder Servin Corporation - http://servin.com Technology Training for Technology ProfessionalsTM norman.mcentire@servin.com 1 Legal Info

More information

View Concepts. iphone Application Programming Lecture 4: User Interface Design. SDK provide many types of Views to show your content

View Concepts. iphone Application Programming Lecture 4: User Interface Design. SDK provide many types of Views to show your content View Concepts iphone Application Programming Lecture 4: User Interface Design SDK provide many types of Views to show your content At run-time Views are organized as a tree Chat Wacharamanotham Media Computing

More information

ios Development Lecture 3 Controllers of View Controllers Ing. Simone Cirani

ios Development Lecture 3 Controllers of View Controllers Ing. Simone Cirani ios Development Lecture 3 Controllers of View Controllers Ing. Simone Cirani email: simone.cirani@unipr.it http://www.tlc.unipr.it/cirani Corso IFTS Cisita ios Development 2014 Parma Università degli Studi

More information

Objective-C Primer. iphone Programmer s Association. Lorenzo Swank September 10, 2008

Objective-C Primer. iphone Programmer s Association. Lorenzo Swank September 10, 2008 Objective-C Primer iphone Programmer s Association Lorenzo Swank September 10, 2008 Disclaimer Content was blatantly and unapologetically stolen from the WWDC 2007 Fundamentals of Cocoa session, as well

More information

Page 1. GUI Programming. Lecture 13: iphone Basics. iphone. iphone

Page 1. GUI Programming. Lecture 13: iphone Basics. iphone. iphone GUI Programming Lecture 13: iphone Basics Until now, we have only seen code for standard GUIs for standard WIMP interfaces. Today we ll look at some code for programming mobile devices. on the surface,

More information

Mobile Development - Lab 2

Mobile Development - Lab 2 Mobile Development - Lab 2 Objectives Illustrate the delegation mechanism through examples Use a simple Web service Show how to simply make a hybrid app Display data with a grid layout Delegation pattern

More information

Code Examples. C# demo projects. PHP Rest Client

Code Examples. C# demo projects. PHP Rest Client Code Examples Developers please use https://api-stage.bimplus.net/v2 (stage version of bim+ API) and http://portal-stage.bimplus.net/ (stage version of Shop/Portal) for testing purposes. The production

More information

CS193E Lecture 7. Document-based Applications NSTableView Key-Value Coding

CS193E Lecture 7. Document-based Applications NSTableView Key-Value Coding CS193E Lecture 7 Document-based Applications NSTableView Key-Value Coding Agenda Questions? Review: delegates, MVC Document-based apps Table views Key Value Coding Model, View, Controller Controller Model

More information

Stanford CS193p. Developing Applications for ios. Winter CS193p! Winter 2015

Stanford CS193p. Developing Applications for ios. Winter CS193p! Winter 2015 Stanford CS193p Developing Applications for ios Today UITextField Bonus Topic! Table View A UIView for displaying long lists or tables of data UITextField Like UILabel, but editable Typing things in on

More information

ITP 342 Mobile App Dev. Locations and Maps

ITP 342 Mobile App Dev. Locations and Maps ITP 342 Mobile App Dev Locations and Maps Locations and Maps Every ios device has the ability to determine where in the world it is Create a live interactive map showing any locations you like, including

More information

vpresent Department of Computer Science and Engineering The Chinese University of Hong Kong Collaborative Presentation System on Mobile Devices

vpresent Department of Computer Science and Engineering The Chinese University of Hong Kong Collaborative Presentation System on Mobile Devices Department of Computer Science and Engineering The Chinese University of Hong Kong vpresent Collaborative Presentation System on Mobile Devices LYU1203 Final Year Project 2012/13 Spring 2013 Report Supervisor:

More information

Object-Oriented Programming in Objective-C

Object-Oriented Programming in Objective-C In order to build the powerful, complex, and attractive apps that people want today, you need more complex tools than a keyboard and an empty file. In this section, you visit some of the concepts behind

More information

ITP 342 Mobile App Dev. Delegates

ITP 342 Mobile App Dev. Delegates ITP 342 Mobile App Dev Delegates Protocol A protocol is a declaration of a list of methods Classes that conform to the protocol implement those methods A protocol can declare two kinds of methods: required

More information

Assignment II: Foundation Calculator

Assignment II: Foundation Calculator Assignment II: Foundation Calculator Objective The goal of this assignment is to extend the CalculatorBrain from last week to allow inputting variables into the expression the user is typing into the calculator.

More information

Announcements. Today s Topics

Announcements. Today s Topics Announcements Lab 2 is due tonight Lab 3 is posted Due next Wednesday Sept 30 th 1 Extensible - CSE 436 Software Networking Engineering Platform Workshop 1 Today s Topics Designing iphone Applica;ons Model-

More information

COMP327 Mobile Computing Session: Lecture Set 1a - Swift Introduction and the Foundation Framework Part 2

COMP327 Mobile Computing Session: Lecture Set 1a - Swift Introduction and the Foundation Framework Part 2 COMP327 Mobile Computing Session: 2018-2019 Lecture Set 1a - Swift Introduction and the Foundation Framework Part 2 73 Other Swift Guard Already seen that for optionals it may be necessary to test that

More information

ITP 342 Mobile App Dev. Fundamentals

ITP 342 Mobile App Dev. Fundamentals ITP 342 Mobile App Dev Fundamentals Objective-C Classes Encapsulate data with the methods that operate on that data An object is a runtime instance of a class Contains its own in-memory copy of the instance

More information

Building the App - Part 5 - Adding a Link

Building the App - Part 5 - Adding a Link Unit 4 - Coding For Your App Copy and Paste the code below exactly where the tutorials tell you. DO NOT COPY TEXT IN RED. Building the App - Part 5 - Adding a Link XCODE 7 @IBAction func Button1(_ sender:

More information

Mobile Application Development

Mobile Application Development Mobile Application Development Lecture 17 Blocks, Concurrency, Networking 2013/2014 Parma Università degli Studi di Parma Lecture Summary Blocks Concurrency and multithreading Grand Central Dispatch (GCD)

More information