iphone Programming Glossary: include
AES Encryption for an NSString on the iPhone http://stackoverflow.com/questions/1400246/aes-encryption-for-an-nsstring-on-the-iphone the extra comma in each call to CCCrypt which caused compile errors. A later comment on that post includes this adapted code which works for me and seems a bit more straightforward. If you include their code.. post includes this adapted code which works for me and seems a bit more straightforward. If you include their code for the NSData category you can write something like this Note The printf calls are only.. @Boz reports that CommonCrypto is part of the Core OS on the iPhone. Both 10.4 and 10.5 have usr include CommonCrypto although 10.5 has a man page for CCCryptor.3cc and 10.4 doesn't so YMMV. EDIT See this..
How to get the RGB values for a pixel on an image on the iphone http://stackoverflow.com/questions/144250/how-to-get-the-rgb-values-for-a-pixel-on-an-image-on-the-iphone the post at this point however to post what I propose is at least for my requirements which include modifying pixel data a better method as it provides writable data whereas as I understand it the method..
How To Make iPhone App compatible with multiple SDK (firmware) versions http://stackoverflow.com/questions/3027120/how-to-make-iphone-app-compatible-with-multiple-sdk-firmware-versions with multiple SDK firmware versions With iOS4 coming out soon I have already planned to include an iAd in a future update of an app of mine. I assume that this will make my app unusable for anyone..
Build fat static library (device + simulator) using Xcode and SDK 4+ http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4 using Xcode and SDK 4 It appears that we can theoretically build a single static library that includes both simulator and iPhone and iPad. However Apple has no documentation on this that I can find and.. can be done inside Xcode. Some history In 2008 we used to be able to make single static libs that included both sim and device. Apple disabled that. Throughout 2009 we made pairs of static libs one for sim.. projects inside each other from Xcode 3.x through to Xcode 4.6.x Bonus script to let you auto include Bundles i.e. include PNG files PLIST files etc from your library see below scroll to bottom now supports..
Bold & Non-Bold Text In A Single UILabel? http://stackoverflow.com/questions/3586871/bold-non-bold-text-in-a-single-uilabel Non Bold Text In A Single UILabel How would it be possible to include both bold and non bold text in a uiLabel I'd rather not use a UIWebView.. I've also read this may be..
Can I embed a custom font in an iPhone application? http://stackoverflow.com/questions/360751/can-i-embed-a-custom-font-in-an-iphone-application I embed a custom font in an iPhone application I would like to have an app include a custom font for rendering text load it and then use it with standard UIKit elements like UILabel...
parsing HTML on the iPhone [closed] http://stackoverflow.com/questions/405749/parsing-html-on-the-iphone HTML. Using it you can send an XPath query and receive the result . Requirements Add libxml2 includes to your project Menu Project Edit Project Settings Search for setting Header Search Paths Add a new.. Edit Project Settings Search for setting Header Search Paths Add a new search path SDKROOT usr include libxml2 Enable recursive option Add libxml2 library to to your project Menu Project Edit Project Settings..
“Warning: iPhone apps should include an armv6 architecture” even with build config set http://stackoverflow.com/questions/4198676/warning-iphone-apps-should-include-an-armv6-architecture-even-with-build-conf Warning iPhone apps should include an armv6 architecture&rdquo even with build config set It's been a while since I've had to adjust project.. hoc distribution configuration. Build generates this warning and error warning iPhone apps should include an armv6 architecture current ARCHS armv7 iPhone iPod Touch application executable is missing a required..
iOS SDK - Programmatically generate a PDF file http://stackoverflow.com/questions/4362734/ios-sdk-programmatically-generate-a-pdf-file iOS 4.1 I haven't tested iOS 4.2 . The issue is related to fonts and only shows up if you include text in your PDF. The symptom is that when generating the PDF you'll see errors in the debug console..
What's the best way to communicate between view controllers? http://stackoverflow.com/questions/569940/whats-the-best-way-to-communicate-between-view-controllers One of the resources I'm using is Stanford's CS193P class notes that they have left on the web. It includes lecture notes assignments and sample code and since the course was given by Apple dev's I definitely.. Page 16 51 How Not To Share Data Global Variables or singletons This includes your application delegate Direct dependencies make your code less reusable And more difficult to debug.. mention for sharing data are part of dependency injection. That's the gist of my response. I'll include an example of using the dependency injection pattern with a controller below in case it's helpful. Example..
Locking the Fields in MFMailComposeViewController http://stackoverflow.com/questions/6284599/locking-the-fields-in-mfmailcomposeviewcontroller downloaded from the internet after searching for it forever. The zip file that you can download includes the overlay images that I created for user feedback. It has both @2x and regular. You will have to.. gmail smtp you will find what you need. Find Framework Art here For your .h file make sure to include for sending email alert UIActivityIndicatorView spinner UIImageView bgimage IBOutlet UILabel loadingLabel.. void removeWaitOverlay void createWaitOverlay void stopSpinner void startSpinner For your .m file include @synthesize bgimage spinner loadingLabel add this in ViewDidLoad set loading label to alpha 0 so its..
AES Encryption for an NSString on the iPhone http://stackoverflow.com/questions/1400246/aes-encryption-for-an-nsstring-on-the-iphone you link to does seem to work pretty decently... aside from the extra comma in each call to CCCrypt which caused compile errors. A later comment on that post includes this adapted code which works for me and seems a bit more straightforward. If you include their code for the NSData category you can write something like this.. CCCrypt which caused compile errors. A later comment on that post includes this adapted code which works for me and seems a bit more straightforward. If you include their code for the NSData category you can write something like this Note The printf calls are only for demonstrating the state of the data at various points in.. autorelease This definitely works on Snow Leopard and @Boz reports that CommonCrypto is part of the Core OS on the iPhone. Both 10.4 and 10.5 have usr include CommonCrypto although 10.5 has a man page for CCCryptor.3cc and 10.4 doesn't so YMMV. EDIT See this follow up question on using Base64 encoding for representing..
How to get the RGB values for a pixel on an image on the iphone http://stackoverflow.com/questions/144250/how-to-get-the-rgb-values-for-a-pixel-on-an-image-on-the-iphone page that can be found at the bottom of this post. I am editing the post at this point however to post what I propose is at least for my requirements which include modifying pixel data a better method as it provides writable data whereas as I understand it the method provided by previous posts and at the bottom of this post..
How To Make iPhone App compatible with multiple SDK (firmware) versions http://stackoverflow.com/questions/3027120/how-to-make-iphone-app-compatible-with-multiple-sdk-firmware-versions To Make iPhone App compatible with multiple SDK firmware versions With iOS4 coming out soon I have already planned to include an iAd in a future update of an app of mine. I assume that this will make my app unusable for anyone on a firmware lower than 4.0. Is there a way to change that..
Build fat static library (device + simulator) using Xcode and SDK 4+ http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4 fat static library device simulator using Xcode and SDK 4 It appears that we can theoretically build a single static library that includes both simulator and iPhone and iPad. However Apple has no documentation on this that I can find and Xcode's default templates are NOT configured to do this. I'm.. I'm looking for a simple portable re usable technique that can be done inside Xcode. Some history In 2008 we used to be able to make single static libs that included both sim and device. Apple disabled that. Throughout 2009 we made pairs of static libs one for sim one for device. Apple has now disabled that too. References.. Apple has a couple of show stopper bugs in Xcode if you embed projects inside each other from Xcode 3.x through to Xcode 4.6.x Bonus script to let you auto include Bundles i.e. include PNG files PLIST files etc from your library see below scroll to bottom now supports iPhone5 using Apple's workaround to the bugs in lipo ...
Bold & Non-Bold Text In A Single UILabel? http://stackoverflow.com/questions/3586871/bold-non-bold-text-in-a-single-uilabel Non Bold Text In A Single UILabel How would it be possible to include both bold and non bold text in a uiLabel I'd rather not use a UIWebView.. I've also read this may be possible using NSAttributedString but I have no idea how to..
Can I embed a custom font in an iPhone application? http://stackoverflow.com/questions/360751/can-i-embed-a-custom-font-in-an-iphone-application I embed a custom font in an iPhone application I would like to have an app include a custom font for rendering text load it and then use it with standard UIKit elements like UILabel. Is this possible I found these links http discussions.apple.com..
parsing HTML on the iPhone [closed] http://stackoverflow.com/questions/405749/parsing-html-on-the-iphone is a Objective C wrapper on the XPathQuery library for parsing HTML. Using it you can send an XPath query and receive the result . Requirements Add libxml2 includes to your project Menu Project Edit Project Settings Search for setting Header Search Paths Add a new search path SDKROOT usr include libxml2 Enable recursive option.. Requirements Add libxml2 includes to your project Menu Project Edit Project Settings Search for setting Header Search Paths Add a new search path SDKROOT usr include libxml2 Enable recursive option Add libxml2 library to to your project Menu Project Edit Project Settings Search for setting Other Linker Flags Add a new search..
“Warning: iPhone apps should include an armv6 architecture” even with build config set http://stackoverflow.com/questions/4198676/warning-iphone-apps-should-include-an-armv6-architecture-even-with-build-conf Warning iPhone apps should include an armv6 architecture&rdquo even with build config set It's been a while since I've had to adjust project build settings. After upgrading to a recent SDK I'm having.. upgrading to a recent SDK I'm having trouble building my ad hoc distribution configuration. Build generates this warning and error warning iPhone apps should include an armv6 architecture current ARCHS armv7 iPhone iPod Touch application executable is missing a required architecture. At least one of the following architecture..
iOS SDK - Programmatically generate a PDF file http://stackoverflow.com/questions/4362734/ios-sdk-programmatically-generate-a-pdf-file in corrupted PDFs. I know this issue exists up to and including iOS 4.1 I haven't tested iOS 4.2 . The issue is related to fonts and only shows up if you include text in your PDF. The symptom is that when generating the PDF you'll see errors in the debug console that look like this Error can't get CIDs for glyphs for 'TimesNewRomanPSMT'..
What's the best way to communicate between view controllers? http://stackoverflow.com/questions/569940/whats-the-best-way-to-communicate-between-view-controllers to get the most out of the language and the frameworks. One of the resources I'm using is Stanford's CS193P class notes that they have left on the web. It includes lecture notes assignments and sample code and since the course was given by Apple dev's I definitely consider it to be from the horse's mouth . Class Website http.. serious of slides http cs193p.stanford.edu downloads 08 NavigationTabBarControllers.pdf Page 16 51 How Not To Share Data Global Variables or singletons This includes your application delegate Direct dependencies make your code less reusable And more difficult to debug test Ok. I'm down with that. Don't blindly toss all your.. modularity are high priorities. All of the best practices they mention for sharing data are part of dependency injection. That's the gist of my response. I'll include an example of using the dependency injection pattern with a controller below in case it's helpful. Example of Using Dependency Injection with a View Controller..
Locking the Fields in MFMailComposeViewController http://stackoverflow.com/questions/6284599/locking-the-fields-in-mfmailcomposeviewcontroller note I take no credit for creating the SMTP framework. It was downloaded from the internet after searching for it forever. The zip file that you can download includes the overlay images that I created for user feedback. It has both @2x and regular. You will have to go into interface builder and create the label though that says.. settings. If you are not familiar with gmail settings google gmail smtp you will find what you need. Find Framework Art here For your .h file make sure to include for sending email alert UIActivityIndicatorView spinner UIImageView bgimage IBOutlet UILabel loadingLabel @property nonatomic retain IBOutlet UILabel loadingLabel.. retain UIActivityIndicatorView spinner void sendEmail void removeWaitOverlay void createWaitOverlay void stopSpinner void startSpinner For your .m file include @synthesize bgimage spinner loadingLabel add this in ViewDidLoad set loading label to alpha 0 so its not displayed loadingLabel.alpha 0 everything else is its own..
AES Encryption for an NSString on the iPhone http://stackoverflow.com/questions/1400246/aes-encryption-for-an-nsstring-on-the-iphone aside from the extra comma in each call to CCCrypt which caused compile errors. A later comment on that post includes this adapted code which works for me and seems a bit more straightforward. If you include their code for the NSData category.. later comment on that post includes this adapted code which works for me and seems a bit more straightforward. If you include their code for the NSData category you can write something like this Note The printf calls are only for demonstrating the.. on Snow Leopard and @Boz reports that CommonCrypto is part of the Core OS on the iPhone. Both 10.4 and 10.5 have usr include CommonCrypto although 10.5 has a man page for CCCryptor.3cc and 10.4 doesn't so YMMV. EDIT See this follow up question on..
How to get the RGB values for a pixel on an image on the iphone http://stackoverflow.com/questions/144250/how-to-get-the-rgb-values-for-a-pixel-on-an-image-on-the-iphone of this post. I am editing the post at this point however to post what I propose is at least for my requirements which include modifying pixel data a better method as it provides writable data whereas as I understand it the method provided by previous..
How To Make iPhone App compatible with multiple SDK (firmware) versions http://stackoverflow.com/questions/3027120/how-to-make-iphone-app-compatible-with-multiple-sdk-firmware-versions To Make iPhone App compatible with multiple SDK firmware versions With iOS4 coming out soon I have already planned to include an iAd in a future update of an app of mine. I assume that this will make my app unusable for anyone on a firmware lower..
Build fat static library (device + simulator) using Xcode and SDK 4+ http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4 device simulator using Xcode and SDK 4 It appears that we can theoretically build a single static library that includes both simulator and iPhone and iPad. However Apple has no documentation on this that I can find and Xcode's default templates.. technique that can be done inside Xcode. Some history In 2008 we used to be able to make single static libs that included both sim and device. Apple disabled that. Throughout 2009 we made pairs of static libs one for sim one for device. Apple.. in Xcode if you embed projects inside each other from Xcode 3.x through to Xcode 4.6.x Bonus script to let you auto include Bundles i.e. include PNG files PLIST files etc from your library see below scroll to bottom now supports iPhone5 using Apple's..
Bold & Non-Bold Text In A Single UILabel? http://stackoverflow.com/questions/3586871/bold-non-bold-text-in-a-single-uilabel Non Bold Text In A Single UILabel How would it be possible to include both bold and non bold text in a uiLabel I'd rather not use a UIWebView.. I've also read this may be possible using NSAttributedString..
Can I embed a custom font in an iPhone application? http://stackoverflow.com/questions/360751/can-i-embed-a-custom-font-in-an-iphone-application I embed a custom font in an iPhone application I would like to have an app include a custom font for rendering text load it and then use it with standard UIKit elements like UILabel. Is this possible I found..
parsing HTML on the iPhone [closed] http://stackoverflow.com/questions/405749/parsing-html-on-the-iphone library for parsing HTML. Using it you can send an XPath query and receive the result . Requirements Add libxml2 includes to your project Menu Project Edit Project Settings Search for setting Header Search Paths Add a new search path SDKROOT.. project Menu Project Edit Project Settings Search for setting Header Search Paths Add a new search path SDKROOT usr include libxml2 Enable recursive option Add libxml2 library to to your project Menu Project Edit Project Settings Search for setting..
“Warning: iPhone apps should include an armv6 architecture” even with build config set http://stackoverflow.com/questions/4198676/warning-iphone-apps-should-include-an-armv6-architecture-even-with-build-conf Warning iPhone apps should include an armv6 architecture&rdquo even with build config set It's been a while since I've had to adjust project build settings... building my ad hoc distribution configuration. Build generates this warning and error warning iPhone apps should include an armv6 architecture current ARCHS armv7 iPhone iPod Touch application executable is missing a required architecture. At..
iOS SDK - Programmatically generate a PDF file http://stackoverflow.com/questions/4362734/ios-sdk-programmatically-generate-a-pdf-file exists up to and including iOS 4.1 I haven't tested iOS 4.2 . The issue is related to fonts and only shows up if you include text in your PDF. The symptom is that when generating the PDF you'll see errors in the debug console that look like this..
What's the best way to communicate between view controllers? http://stackoverflow.com/questions/569940/whats-the-best-way-to-communicate-between-view-controllers and the frameworks. One of the resources I'm using is Stanford's CS193P class notes that they have left on the web. It includes lecture notes assignments and sample code and since the course was given by Apple dev's I definitely consider it to be.. downloads 08 NavigationTabBarControllers.pdf Page 16 51 How Not To Share Data Global Variables or singletons This includes your application delegate Direct dependencies make your code less reusable And more difficult to debug test Ok. I'm down.. best practices they mention for sharing data are part of dependency injection. That's the gist of my response. I'll include an example of using the dependency injection pattern with a controller below in case it's helpful. Example of Using Dependency..
Locking the Fields in MFMailComposeViewController http://stackoverflow.com/questions/6284599/locking-the-fields-in-mfmailcomposeviewcontroller SMTP framework. It was downloaded from the internet after searching for it forever. The zip file that you can download includes the overlay images that I created for user feedback. It has both @2x and regular. You will have to go into interface builder.. gmail settings google gmail smtp you will find what you need. Find Framework Art here For your .h file make sure to include for sending email alert UIActivityIndicatorView spinner UIImageView bgimage IBOutlet UILabel loadingLabel @property nonatomic.. void sendEmail void removeWaitOverlay void createWaitOverlay void stopSpinner void startSpinner For your .m file include @synthesize bgimage spinner loadingLabel add this in ViewDidLoad set loading label to alpha 0 so its not displayed loadingLabel.alpha..
get the bundle id of app from PID in ios http://stackoverflow.com/questions/11573822/get-the-bundle-id-of-app-from-pid-in-ios of data into a C string buffer that can be parsed programmatically. Get the header and .c file here darwin.c darwin.h Include those two files in your Xcode project and #include darwin.h . Then use it like so OS_initialize size_t buffSize 20000 you..
PhoneGap and iPhone 5: Remove top and bottom black stripes http://stackoverflow.com/questions/12508775/phonegap-and-iphone-5-remove-top-and-bottom-black-stripes share improve this question All apps that do not include the Default 568h@2x.png file are displayed in a letter box. Include the Default 568h@2x.png will make your app fill the screen on 4 retina devices. The web browser view of the PhoneGrap should..
How to add Facebook, twitter, mail, message icons in UIactivityviewcontroller http://stackoverflow.com/questions/12606444/how-to-add-facebook-twitter-mail-message-icons-in-uiactivityviewcontroller iMessage as share services in activityviewcontroller. Thanks for help. iphone ios6 share improve this question Include an array of things being attached to the ActivityViewController The Array cannot be nil you must provide something. Either..
Include a resource directory hierarchy into app bundle http://stackoverflow.com/questions/1401338/include-a-resource-directory-hierarchy-into-app-bundle a resource directory hierarchy into app bundle I have a directory structure multiple levels deep of resources that I would..
UITextField: move view when keyboard appears http://stackoverflow.com/questions/1775860/uitextfield-move-view-when-keyboard-appears a single UIWindow . If you use multiple UIWindows you may need to modify retrieveFrameFromNotification method. Usage Include KBKeyboardHandler.h KBKeyboardHandler.m and KBKeyboardHandlerDelegate.h in your project. Implement the KBKeyboardHandlerDelegate..
Objective-C: How Can I Access String Variable As a Global? http://stackoverflow.com/questions/2238103/objective-c-how-can-i-access-string-variable-as-a-global this question You can achieve that by implementing getter and setters in the delegate class. In delegate .h file Include UIApplication delegate @interface DevAppDelegate NSObject UIApplicationDelegate NSString currentTitle void setCurrentTitle..
My iPhone app needs a persistent network connection…how to specify UIRequiredDeviceCapabilities? http://stackoverflow.com/questions/2338539/my-iphone-app-needs-a-persistent-network-connection-how-to-specify-uirequiredd Info.plist file. My app requires a persistent network connection. If I look at the definition for the wifi key it says Include this key if your application requires access to the networking features of the device. So does the wifi key indicate that..
Application update, insert data in coredata while preserving userdata without modelchange http://stackoverflow.com/questions/2750614/application-update-insert-data-in-coredata-while-preserving-userdata-without-mo
Retina Display Images on iPhone [duplicate] http://stackoverflow.com/questions/4800467/retina-display-images-on-iphone Are there issues with the iPhone 3G or older iPhone with higher res images iphone ios share improve this question Include a hi res version of your image named as image@2x.png where image.png is the normal resolution . When you access your image..
table reloadData not working http://stackoverflow.com/questions/4929960/table-reloaddata-not-working its not working reload data... table endUpdates iphone ipad iphone sdk 3.0 share improve this question Include this line self.allBookMarks removeObjectAtIndex indexPath.row EDIT The problem is not with reloadData the problem is that..
Implementing Facebook into Xcode Project http://stackoverflow.com/questions/5383049/implementing-facebook-into-xcode-project open in Xcode drag and drop the FBConnect folder from the Facebook SDK project into your application's project. Include the FBConnect headers in your code #import FBConnect FBConnect.h You should now be able to compile your project successfully...
iOS: How to store username/password within an app? http://stackoverflow.com/questions/6972092/ios-how-to-store-username-password-within-an-app items and here is how to use the keychain wrapper class from that sample which greatly simplifies using Keychain. Include Security.framework in Xcode 3 right click on frameworks folder and add existing framework. In Xcode 4 select your project..
Easiest way to determine whether iPhone internet connection is available? http://stackoverflow.com/questions/784582/easiest-way-to-determine-whether-iphone-internet-connection-is-available on the iPhone Thanks Ben iphone iphone web share improve this question Follow following 3 easy steps Step 1 Include SystemConfiguration.framework framework in your project Step 2 Included Apple's Reachability.h and Reachability.m from Reachability.. question Follow following 3 easy steps Step 1 Include SystemConfiguration.framework framework in your project Step 2 Included Apple's Reachability.h and Reachability.m from Reachability example Step 3 Now add this code anywhere in your .m. Reachability..
How to set rectangle border for custom type UIButton http://stackoverflow.com/questions/854306/how-to-set-rectangle-border-for-custom-type-uibutton c cocoa touch share improve this question When you set a background image in a button the button outlines go away. Include them in your image if you need different sizes look at the UIImage stretchableImageWithLeftCapWidth topCapHeight method...
scale fit mobile web content using viewport meta tag http://stackoverflow.com/questions/8735457/scale-fit-mobile-web-content-using-viewport-meta-tag that is the webview area android iphone ios mobile viewport share improve this question In the head add this Include jQuery meta id Viewport name viewport width initial scale 1 maximum scale 1 minimum scale 1 user scalable no script type..
ffmpeg won't ./configure in iOS5.1 http://stackoverflow.com/questions/9982528/ffmpeg-wont-configure-in-ios5-1 version fails report the problem to the ffmpeg user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net. Include the log file config.err produced by configure as this will help solving the problem. Could somebody please provide the correct..
Video playing automatically in UIWebView http://stackoverflow.com/questions/9992735/video-playing-automatically-in-uiwebview frame.size.height webView loadHTMLString html baseURL nil self.view addSubview webView webView release Include above function to your page and call it by passing the urlstring self videoThumb url frame frame this parameter needs the..
|