iphone Programming Glossary: called
How to check for an active Internet Connection on iPhone SDK? http://stackoverflow.com/questions/1083701/how-to-check-for-an-active-internet-connection-on-iphone-sdk the .m file of where you are implementing the check you can place this in one of the first methods called init or viewWillAppear or viewDidLoad etc void viewWillAppear BOOL animated check for internet connection.. you may have set up in my case I just set a BOOL void checkNetworkStatus NSNotification notice called after network status changes NetworkStatus internetStatus internetReachable currentReachabilityStatus..
HTML character decoding in Objective-C / Cocoa Touch http://stackoverflow.com/questions/1105169/html-character-decoding-in-objective-c-cocoa-touch over the net and found related discussions but no fix for my particular encoding I think they are called hexadecimal characters. iphone html objective c cocoa cocoa touch share improve this question Those.. characters. iphone html objective c cocoa cocoa touch share improve this question Those are called Character Entity References . When they take the form of # number they are called numeric entity references.. Those are called Character Entity References . When they take the form of # number they are called numeric entity references . Basically it's a string representation of the byte that should be substituted...
Add UIPickerView & a Button in Action sheet - How? http://stackoverflow.com/questions/1262574/add-uipickerview-a-button-in-action-sheet-how SimpleTableViewControllerDelegate with a required method itemSelectedatRow and a weak property called delegate of type id SimpleTableViewControllerDelegate . This is how we will pass the selection back..
How to customize the callout bubble for MKAnnotationView? http://stackoverflow.com/questions/1565828/how-to-customize-the-callout-bubble-for-mkannotationview only when canShowCallout is set to YES in my custom annotation view class. These methods are NOT called if I have this set to NO which is what I want so that the default callout bubble is not drawn . So I..
Objective-C categories in static library http://stackoverflow.com/questions/2567498/objective-c-categories-in-static-library we should explicitly call some real code from category file. So at least class function should be called. And we even need not dummy class. Single c function do the same. So if we write lib files as mylib.h..
Cocoa Graphing/Plotting Framework that Works on iPhoneOS [closed] http://stackoverflow.com/questions/263472/cocoa-graphing-plotting-framework-that-works-on-iphoneos improve this question There's a plotting framework in active development over on Google Code called CorePlot http code.google.com p core plot It works on both Mac and iPhone. share improve this answer..
How do I export UIImage array as a movie? http://stackoverflow.com/questions/3741323/how-do-i-export-uiimage-array-as-a-movie framework . The writer has an input of type AVAssetWriterInput which in turn has a method called appendSampleBuffer that lets you add individual frames to a video stream. Essentially you ™ll have to..
How to filter NSFetchedResultsController (CoreData) with UISearchDisplayController/UISearchBar http://stackoverflow.com/questions/4471289/how-to-filter-nsfetchedresultscontroller-coredata-with-uisearchdisplaycontroll UITableView not the search table view that is active while searching will possibly have callbacks called while you are searching and try to incorrectly use the filtered version of your FRC and you will see..
iPhone - Backgrounding to poll for events http://stackoverflow.com/questions/4656214/iphone-backgrounding-to-poll-for-events is done in your AppDelegate if the iOS device allows background execution this Handler will be called void backgroundHandler NSLog @ ### VOIP backgrounding callback try to do sth. According to Apple we.. bgTask Code if the iOS device allows background execution this Handler will be called void backgroundHandler NSLog @ ### VOIP backgrounding callback UIApplication app UIApplication sharedApplication.. self doSomething sleep 1 After your app has timed out the VoIP expirationHandler will be called where you simply restart a long running task. This task will be terminated after 600 seconds. But there..
Lock-down iPhone/iPod/iPad so it can only run one app http://stackoverflow.com/questions/5011774/lock-down-iphone-ipod-ipad-so-it-can-only-run-one-app EDIT EDIT brainray posted below and pointed out that there's a new feature in iOS 6 called 'guided access' that allows you to lock a device to a specific app. It's a pity this feature wasn't..
How to Sync iPhone Core Data with web server, and then push to other devices? http://stackoverflow.com/questions/5035132/how-to-sync-iphone-core-data-with-web-server-and-then-push-to-other-devices sync strategy but requires more effort to be implemented correctly. EDIT The Objective C framework called ZSync and developed by Marcus Zarra has been deprecated given that iCloud supports core data synchronization...
What's the best way to communicate between view controllers? http://stackoverflow.com/questions/569940/whats-the-best-way-to-communicate-between-view-controllers ... bookPicker handleCheckout Do stuff to verify that BookPickerViewController correctly called MockCheckoutController's handleCheckout method and passed it a valid list of books ... share improve..
Understanding reference counting with Cocoa and Objective-C http://stackoverflow.com/questions/6578/understanding-reference-counting-with-cocoa-and-objective-c to free this object up after a little while. From a plumbing perspective when autorelease is called the current thread's NSAutoreleasePool is alerted of the call. The NSAutoreleasePool now knows that..
performSelector may cause a leak because its selector is unknown http://stackoverflow.com/questions/7017281/performselector-may-cause-a-leak-because-its-selector-is-unknown methods so you could do this directly with the runtime API as well . These function pointers are called IMP s and are simple typedef ed function pointers id IMP id SEL ... 1 . This may be close to the actual..
How to get information about free memory and running processes in an App Store approved app? (Yes, there is one!) http://stackoverflow.com/questions/8275578/how-to-get-information-about-free-memory-and-running-processes-in-an-app-store-a free memory and running processes in an App Store approved app Yes there is one There is an app called Activity Monitor Touch in the App Store which displays background processes as well as free memory...
How to check for an active Internet Connection on iPhone SDK? http://stackoverflow.com/questions/1083701/how-to-check-for-an-active-internet-connection-on-iphone-sdk to the .m file where you are implementing the check 7 In the .m file of where you are implementing the check you can place this in one of the first methods called init or viewWillAppear or viewDidLoad etc void viewWillAppear BOOL animated check for internet connection NSNotificationCenter defaultCenter addObserver self selector.. gets sent and set whatever checks or call whatever methods you may have set up in my case I just set a BOOL void checkNetworkStatus NSNotification notice called after network status changes NetworkStatus internetStatus internetReachable currentReachabilityStatus switch internetStatus case NotReachable NSLog @ The internet..
HTML character decoding in Objective-C / Cocoa Touch http://stackoverflow.com/questions/1105169/html-character-decoding-in-objective-c-cocoa-touch come from a RSS feed btw look like this #038 I searched all over the net and found related discussions but no fix for my particular encoding I think they are called hexadecimal characters. iphone html objective c cocoa cocoa touch share improve this question Those are called Character Entity References . When they take.. my particular encoding I think they are called hexadecimal characters. iphone html objective c cocoa cocoa touch share improve this question Those are called Character Entity References . When they take the form of # number they are called numeric entity references . Basically it's a string representation of the byte.. html objective c cocoa cocoa touch share improve this question Those are called Character Entity References . When they take the form of # number they are called numeric entity references . Basically it's a string representation of the byte that should be substituted. In the case of #038 it represents the character with..
Add UIPickerView & a Button in Action sheet - How? http://stackoverflow.com/questions/1262574/add-uipickerview-a-button-in-action-sheet-how table. Also in SimpleTableViewController.h create a protocol SimpleTableViewControllerDelegate with a required method itemSelectedatRow and a weak property called delegate of type id SimpleTableViewControllerDelegate . This is how we will pass the selection back to the parent controller. In SimpleTableViewController.m implement..
How to customize the callout bubble for MKAnnotationView? http://stackoverflow.com/questions/1565828/how-to-customize-the-callout-bubble-for-mkannotationview by making a call to my custom annotation view. This works but only when canShowCallout is set to YES in my custom annotation view class. These methods are NOT called if I have this set to NO which is what I want so that the default callout bubble is not drawn . So I have no way of knowing if the user touched on my point on the..
Objective-C categories in static library http://stackoverflow.com/questions/2567498/objective-c-categories-in-static-library said he even not instantiated dummy object. Mm As I've found we should explicitly call some real code from category file. So at least class function should be called. And we even need not dummy class. Single c function do the same. So if we write lib files as mylib.h void useMyLib @interface NSObject Logger void logSelf @end..
Cocoa Graphing/Plotting Framework that Works on iPhoneOS [closed] http://stackoverflow.com/questions/263472/cocoa-graphing-plotting-framework-that-works-on-iphoneos
How do I export UIImage array as a movie? http://stackoverflow.com/questions/3741323/how-do-i-export-uiimage-array-as-a-movie Take a look at AVAssetWriter and the rest of the AVFoundation framework . The writer has an input of type AVAssetWriterInput which in turn has a method called appendSampleBuffer that lets you add individual frames to a video stream. Essentially you ™ll have to 1 Wire the writer NSError error nil AVAssetWriter videoWriter..
How to filter NSFetchedResultsController (CoreData) with UISearchDisplayController/UISearchBar http://stackoverflow.com/questions/4471289/how-to-filter-nsfetchedresultscontroller-coredata-with-uisearchdisplaycontroll use one FRC NSFetchedResultsController then the original UITableView not the search table view that is active while searching will possibly have callbacks called while you are searching and try to incorrectly use the filtered version of your FRC and you will see exceptions thrown about incorrect number of sections or rows..
iPhone - Backgrounding to poll for events http://stackoverflow.com/questions/4656214/iphone-backgrounding-to-poll-for-events used VoIP backgrounding enabled in my plist. All the code here is done in your AppDelegate if the iOS device allows background execution this Handler will be called void backgroundHandler NSLog @ ### VOIP backgrounding callback try to do sth. According to Apple we have ONLY 30 seconds to perform this Task Else the Application.. leads into infinite execution in background Header UIBackgroundTaskIdentifier bgTask Code if the iOS device allows background execution this Handler will be called void backgroundHandler NSLog @ ### VOIP backgrounding callback UIApplication app UIApplication sharedApplication bgTask app beginBackgroundTaskWithExpirationHandler.. left f UIApplication sharedApplication .backgroundTimeRemaining self doSomething sleep 1 After your app has timed out the VoIP expirationHandler will be called where you simply restart a long running task. This task will be terminated after 600 seconds. But there will be again a call to the expiration handler which starts..
Lock-down iPhone/iPod/iPad so it can only run one app http://stackoverflow.com/questions/5011774/lock-down-iphone-ipod-ipad-so-it-can-only-run-one-app forget to reboot your device http ipadhire.co.nz lockdown.mobileconfig EDIT EDIT brainray posted below and pointed out that there's a new feature in iOS 6 called 'guided access' that allows you to lock a device to a specific app. It's a pity this feature wasn't available a year ago would have saved us a bit of hassle EDIT..
How to Sync iPhone Core Data with web server, and then push to other devices? http://stackoverflow.com/questions/5035132/how-to-sync-iphone-core-data-with-web-server-and-then-push-to-other-devices This provides an overall much more robust and reliable sync strategy but requires more effort to be implemented correctly. EDIT The Objective C framework called ZSync and developed by Marcus Zarra has been deprecated given that iCloud supports core data synchronization. Well in theory... as of this writing June 13 2012..
What's the best way to communicate between view controllers? http://stackoverflow.com/questions/569940/whats-the-best-way-to-communicate-between-view-controllers
Understanding reference counting with Cocoa and Objective-C http://stackoverflow.com/questions/6578/understanding-reference-counting-with-cocoa-and-objective-c as a convenient and sometimes necessary way to tell the system to free this object up after a little while. From a plumbing perspective when autorelease is called the current thread's NSAutoreleasePool is alerted of the call. The NSAutoreleasePool now knows that once it gets an opportunity after the current iteration of the..
performSelector may cause a leak because its selector is unknown http://stackoverflow.com/questions/7017281/performselector-may-cause-a-leak-because-its-selector-is-unknown and it works through some lower level Objective C runtime methods so you could do this directly with the runtime API as well . These function pointers are called IMP s and are simple typedef ed function pointers id IMP id SEL ... 1 . This may be close to the actual method signature of the method but will not always match..
How to get information about free memory and running processes in an App Store approved app? (Yes, there is one!) http://stackoverflow.com/questions/8275578/how-to-get-information-about-free-memory-and-running-processes-in-an-app-store-a to get information about free memory and running processes in an App Store approved app Yes there is one There is an app called Activity Monitor Touch in the App Store which displays background processes as well as free memory. So there MUST be an public API to access this information. The..
How to check for an active Internet Connection on iPhone SDK? http://stackoverflow.com/questions/1083701/how-to-check-for-an-active-internet-connection-on-iphone-sdk the check 7 In the .m file of where you are implementing the check you can place this in one of the first methods called init or viewWillAppear or viewDidLoad etc void viewWillAppear BOOL animated check for internet connection NSNotificationCenter.. call whatever methods you may have set up in my case I just set a BOOL void checkNetworkStatus NSNotification notice called after network status changes NetworkStatus internetStatus internetReachable currentReachabilityStatus switch internetStatus..
HTML character decoding in Objective-C / Cocoa Touch http://stackoverflow.com/questions/1105169/html-character-decoding-in-objective-c-cocoa-touch #038 I searched all over the net and found related discussions but no fix for my particular encoding I think they are called hexadecimal characters. iphone html objective c cocoa cocoa touch share improve this question Those are called Character.. called hexadecimal characters. iphone html objective c cocoa cocoa touch share improve this question Those are called Character Entity References . When they take the form of # number they are called numeric entity references . Basically.. improve this question Those are called Character Entity References . When they take the form of # number they are called numeric entity references . Basically it's a string representation of the byte that should be substituted. In the case of..
Add UIPickerView & a Button in Action sheet - How? http://stackoverflow.com/questions/1262574/add-uipickerview-a-button-in-action-sheet-how create a protocol SimpleTableViewControllerDelegate with a required method itemSelectedatRow and a weak property called delegate of type id SimpleTableViewControllerDelegate . This is how we will pass the selection back to the parent controller...
How to customize the callout bubble for MKAnnotationView? http://stackoverflow.com/questions/1565828/how-to-customize-the-callout-bubble-for-mkannotationview view. This works but only when canShowCallout is set to YES in my custom annotation view class. These methods are NOT called if I have this set to NO which is what I want so that the default callout bubble is not drawn . So I have no way of knowing..
Objective-C categories in static library http://stackoverflow.com/questions/2567498/objective-c-categories-in-static-library Mm As I've found we should explicitly call some real code from category file. So at least class function should be called. And we even need not dummy class. Single c function do the same. So if we write lib files as mylib.h void useMyLib @interface..
Cocoa Graphing/Plotting Framework that Works on iPhoneOS [closed] http://stackoverflow.com/questions/263472/cocoa-graphing-plotting-framework-that-works-on-iphoneos
How do I export UIImage array as a movie? http://stackoverflow.com/questions/3741323/how-do-i-export-uiimage-array-as-a-movie the rest of the AVFoundation framework . The writer has an input of type AVAssetWriterInput which in turn has a method called appendSampleBuffer that lets you add individual frames to a video stream. Essentially you ™ll have to 1 Wire the writer NSError..
How to filter NSFetchedResultsController (CoreData) with UISearchDisplayController/UISearchBar http://stackoverflow.com/questions/4471289/how-to-filter-nsfetchedresultscontroller-coredata-with-uisearchdisplaycontroll then the original UITableView not the search table view that is active while searching will possibly have callbacks called while you are searching and try to incorrectly use the filtered version of your FRC and you will see exceptions thrown about..
iPhone - Backgrounding to poll for events http://stackoverflow.com/questions/4656214/iphone-backgrounding-to-poll-for-events All the code here is done in your AppDelegate if the iOS device allows background execution this Handler will be called void backgroundHandler NSLog @ ### VOIP backgrounding callback try to do sth. According to Apple we have ONLY 30 seconds.. Header UIBackgroundTaskIdentifier bgTask Code if the iOS device allows background execution this Handler will be called void backgroundHandler NSLog @ ### VOIP backgrounding callback UIApplication app UIApplication sharedApplication bgTask.. .backgroundTimeRemaining self doSomething sleep 1 After your app has timed out the VoIP expirationHandler will be called where you simply restart a long running task. This task will be terminated after 600 seconds. But there will be again a..
Lock-down iPhone/iPod/iPad so it can only run one app http://stackoverflow.com/questions/5011774/lock-down-iphone-ipod-ipad-so-it-can-only-run-one-app lockdown.mobileconfig EDIT EDIT brainray posted below and pointed out that there's a new feature in iOS 6 called 'guided access' that allows you to lock a device to a specific app. It's a pity this feature wasn't available a year ago..
What's the best way to communicate between view controllers? http://stackoverflow.com/questions/569940/whats-the-best-way-to-communicate-between-view-controllers
Understanding reference counting with Cocoa and Objective-C http://stackoverflow.com/questions/6578/understanding-reference-counting-with-cocoa-and-objective-c way to tell the system to free this object up after a little while. From a plumbing perspective when autorelease is called the current thread's NSAutoreleasePool is alerted of the call. The NSAutoreleasePool now knows that once it gets an opportunity..
performSelector may cause a leak because its selector is unknown http://stackoverflow.com/questions/7017281/performselector-may-cause-a-leak-because-its-selector-is-unknown Objective C runtime methods so you could do this directly with the runtime API as well . These function pointers are called IMP s and are simple typedef ed function pointers id IMP id SEL ... 1 . This may be close to the actual method signature..
How to get information about free memory and running processes in an App Store approved app? (Yes, there is one!) http://stackoverflow.com/questions/8275578/how-to-get-information-about-free-memory-and-running-processes-in-an-app-store-a get information about free memory and running processes in an App Store approved app Yes there is one There is an app called Activity Monitor Touch in the App Store which displays background processes as well as free memory. So there MUST be an..
Detect when home button is pressed iOS http://stackoverflow.com/questions/10324596/detect-when-home-button-is-pressed-ios instead of applicationWillTerminate when the user quits. void applicationWillTerminate UIApplication application Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground . In your implementation..
GameKit in iPhone SDK 3.0 http://stackoverflow.com/questions/1049393/gamekit-in-iphone-sdk-3-0 the available list case GKPeerStateUnavailable if _peerList _peerList removeObject peerID peerChanged YES break Called when the peer has connected to us. case GKPeerStateConnected start reading and writing break case GKPeerStateDisconnected..
Chartboost in iphone project / Chartboost usage in iOS http://stackoverflow.com/questions/11412496/chartboost-in-iphone-project-chartboost-usage-in-ios error in loading them. I would implement the delegate methods as described in the docs particularly the didFail method Called before requesting an interstitial from the back end BOOL shouldRequestInterstitial NSString location Called when an interstitial.. method Called before requesting an interstitial from the back end BOOL shouldRequestInterstitial NSString location Called when an interstitial has been received before it is presented on screen Return NO if showing an interstitial is currently.. inappropriate for example if the user has entered the main game mode BOOL shouldDisplayInterstitial NSString location Called when the user dismisses the interstitial void didDismissInterstitial NSString location Same as above but only called when..
How can I upload a photo to a server with the iPhone? http://stackoverflow.com/questions/125306/how-can-i-upload-a-photo-to-a-server-with-the-iphone performSelector success doneSelector errorSelector withObject self Uploader Private connectionDidFinishLoading Called when the upload is complete. We judge the success of the upload based on the reply we get from the server. Results None.. self connection release self uploadSucceeded uploadDidSucceed Uploader Private connection didFailWithError Called when the upload failed probably due to a lack of network connection . Results None Side effects None void connection.. UTF8String connection release self uploadSucceeded NO Uploader Private connection didReceiveResponse Called as we get responses from the server. Results None Side effects None void connection NSURLConnection connection IN didReceiveResponse..
How do I do an Asychronous NSURLConnection inside an NSOperation? http://stackoverflow.com/questions/1304508/how-do-i-do-an-asychronous-nsurlconnection-inside-an-nsoperation nil Forward errors to the delegate. void connection NSURLConnection connection didFailWithError NSError error done YES Called when a chunk of data has been downloaded. void connection NSURLConnection connection didReceiveData NSData data Process..
How to list only online users on facebook with xmpp framework http://stackoverflow.com/questions/5300912/how-to-list-only-online-users-on-facebook-with-xmpp-framework the fbDidLogin is called here are the delegate methods you should include #pragma mark FBLoginDialogDelegate Called when the user successfully logged in. void fbDidLogin NSLog @ logged in..................... appDelegate.facebook requestWithGraphPath.. tableView setAlpha 1.0 self.view addSubview tableView self.tableView reloadData self showTopBar Called when the user dismissed the dialog without logging in. void fbDidNotLogin BOOL cancelled UIAlertView alert UIAlertView alloc.. message @ Login cancled delegate self cancelButtonTitle @ OK otherButtonTitles nil nil alert show alert release Called when the user logged out. void fbDidLogout UIAlertView alert UIAlertView alloc initWithTitle @ Logged out message @ Logged..
GCD, Threads, Program Flow and UI Updating http://stackoverflow.com/questions/7290931/gcd-threads-program-flow-and-ui-updating the UI Labels updated with moves solution data. Then once it's finished calculating the puzzle Button is ENABLED YES Called when button is pressed void solvePuzzle id sender solveButton.enabled NO solveButton.title @ Working . . . . I've tried..
How can I use iCloud to synchronize a .zip file between my apps? http://stackoverflow.com/questions/8047217/how-can-i-use-icloud-to-synchronize-a-zip-file-between-my-apps strong NSData zipDataContent @end 4 #import MyDocument.h @implementation MyDocument @synthesize zipDataContent Called whenever the application reads data from the file system BOOL loadFromContents id contents ofType NSString typeName error.. length contents length NSNotificationCenter defaultCenter postNotificationName @ noteModified object self return YES Called whenever the application auto saves the content of a note id contentsForType NSString typeName error NSError outError return..
Application windows are expected to have a root view controller at the end of application launch http://stackoverflow.com/questions/9844626/application-windows-are-expected-to-have-a-root-view-controller-at-the-end-of-ap 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.. 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 . @end iphone..
Sqlite Database Load Fails - Issue with sqlite prepare statement - iPhone - xCode 4.3.1 http://stackoverflow.com/questions/9887785/sqlite-database-load-fails-issue-with-sqlite-prepare-statement-iphone-xcod I am having issues with the following code which loads an SQLite database. NSArray getDatabase NSLog @ Get Database Called NSMutableArray retval NSMutableArray alloc init autorelease NSString query @ SELECT Description UniqueID HexCoords NoHexCoords..
|