Presence3:NSThread & NSOperation

Im looking through Presence3, understand the LetsMakeAThread project, its pretty straight forward, detachNewThread creates a separate thread and performSelectorOnMainThread returns you to the MT, but in ThreadedFlickrTableView, whats the deal? beginLoadingFlickrData calls a new invocation operation, which loads synchronousLoadFlickrData: which gets the data from Flickr and returns to MT via didFinishLoadingFlickrDataWithResults: which in turn creates the arrays from the FlickrData. Then cachedImageForURL gets called from the cellForRowAtIndexPath?  And so that same method calls the ImageLoadingOperation which then returns to the main thread via didFinishLoadingImageWithResult:? Is this chronology correct?  The MT gets separated or stopped 2x in this app? Once in beginLoadingFlickrData and then in cachedImageForURL?  The difference being that in… Read More

Continue Reading

Plists, SQLite, Write2Disk, PassingData VC

Im working my way thru Lecture 9. Recapping what ive done, i created 2 Preence2 projects; first i pass data using the custom initWithpassedData: method which didnt let me use the initWithStyle for the tweets table view, and second I used the appDelegate pattern which i dont like cause its really a global variable. So Im looking into KVOs and NSNotifications but they look kinda scary! I started using plists for a couple of projects, found out they can be further structured to no just a simple array or a dictionary with keys and objects, but also kind of a flat db with parents and childs. Ill try using plists… Read More

Continue Reading

View Controllers Stanford CS193P iPhone Dev

From looking at the MyTabBar app from Lecture 7 you can see that ViewControllers can be created with IB or programatically, like many other things in Xcode/IB.  The important thing is that in IB its not flexible; the way i see it if you create it in IB youre pretty much stuck with the design but in Xcode you can add things based on variables you get from the user or a data source.  EXAMPLE: 1. I went thru a tutorial from LittleComputers.net where we created a tabBarController with 2 tabs and later on added a NavigationController to one of the tabs.  Basically i dragged a tabcontroller from the IB… Read More

Continue Reading

Presence1 CS193P Stanford iPhone Dev

This was a great assignment for me.  I was able to get the PersonListViewController up and running.  I started by: a) Adding the navigationController ivar in the delegate file (h) and adding its view to the window (m) as well as releasing it in dealloc.  Remember its EITHER OR. You EITHER add the nav or tab or table VIEWCONTROLLER as a CONTROL in the XIB FILE. OR you add it in code, by ALLOC/INITING it in the Class File. b) then i added the IBAction in the PersonListViewController (h) and implementing that method (m) by instantiating the PersonDetailViewController, pushing it to the stack and releasing it.  Creating in my mind… Read More

Continue Reading