¡@

Home 

2014/10/15 ¤U¤È 10:03:35

iphone Programming Glossary: also

iOS 6 apps - how to deal with iPhone 5 screen size? [duplicate]

http://stackoverflow.com/questions/12396545/ios-6-apps-how-to-deal-with-iphone-5-screen-size

568h@2x.png . And it has to be retina quality there's no backward compatibility here You could also select this image from within Xcode. Go to the target and under the Summary section look for Launch..

How to detect iPhone 5 (widescreen devices)?

http://stackoverflow.com/questions/12446990/how-to-detect-iphone-5-widescreen-devices

an application that runs on both iPhone 4 and 5 of course I have to build every window twice but I also have to detect whether the user has an iPhone with 3.5 or 4 screen and then apply the view. How should.. That's not very hard read some documentation about that. It will save you a lot of time. iOS 6 also offers new features about this but this is still under NDA at the moment. Be sure to read the API changelog.. does only detect a widescreen not an actual iPhone 5. Next versions of the iPod touch will maybe also have such a screen so we may use another set of macros. Let's rename the original macro IS_WIDESCREEN..

Reading ePub format

http://stackoverflow.com/questions/1388467/reading-epub-format

media type application oebps package xml . This is the OPF file for the book. 6 parse the OPF file also XML 7 now you need to know what the first chapter of the book is. a each item in the manifest element..

AES Encryption for an NSString on the iPhone

http://stackoverflow.com/questions/1400246/aes-encryption-for-an-nsstring-on-the-iphone

it... I've seen lots of references to CCCrypt but it's failed in every case I've used it. I would also have to be able to decrypt an encrypted string but I hope that's as simple as kCCEncrypt kCCDecrypt...

How do I detect when someone shakes an iPhone?

http://stackoverflow.com/questions/150446/how-do-i-detect-when-someone-shakes-an-iphone

views that become first responder from user actions like a search bar or text entry field you'll also need to restore the shaking view first responder status when the other view resigns This method works..

EXC_BAD_ACCESS signal received

http://stackoverflow.com/questions/327082/exc-bad-access-signal-received

signal EXC_BAD_ACCESS . The program runs without any issue on the iPhone simulator it will also debug and run as long as I step through the instructions one at a time. As soon as I let it run again..

How do I apply a perspective transform to a UIView?

http://stackoverflow.com/questions/347721/how-do-i-apply-a-perspective-transform-to-a-uiview

fraction for your initial transform then apply your layer rotation transforms to that. You should also be able to do the following UIView myView self subviews objectAtIndex 0 CALayer layer myView.layer CATransform3D..

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

CURRENTCONFIG_SIMULATOR_DIR EXECUTABLE_NAME ######### # # Added StackOverflow suggestion to also copy include files # untested but should work OK # echo Fetching headers from PUBLIC_HEADERS_FOLDER_PATH.. directory of the debug universal directory they will be in usr local include OPTIONAL NOTE if you also try to drag drop your project into another Xcode project this exposes a bug in Xcode 4 where it cannot..

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

each glyph myself which is a bit too much like hard work especially for multi line text. I've also found posts that say straight out that it's not possible but without justification so I'm looking for..

Gradients on UIView and UILabels On iPhone [duplicate]

http://stackoverflow.com/questions/422066/gradients-on-uiview-and-uilabels-on-iphone

greatly appreciated. iphone ios cocoa touch gradient share improve this question You could also use a graphic image one pixel wide as the gradient and set the view property to expand the graphic to..

How do I get a background location update every n minutes in my iOS application?

http://stackoverflow.com/questions/6347503/how-do-i-get-a-background-location-update-every-n-minutes-in-my-ios-application

current location without the user having to launch the app via the notification . This approach also doesn't seem to be a clean approach as this is not what notifications should be used for. UIApplication.. As far as I understand this should be used to finish some work in the background also limited in time when an app is moved to the background rather than implementing long running background..

What is the best way to deal with the NSDateFormatter locale “feature”?

http://stackoverflow.com/questions/6613110/what-is-the-best-way-to-deal-with-the-nsdateformatter-locale-feature

category with an additional initializer that takes care of assigning the locale and possibly also a format string so you'd have a ready to use formatter right after initializing it. @interface NSDateFormatter.. method in a future version of the OS. In case you're always using the same date format s you could also add category methods that return singleton instances with certain configurations something like sharedRFC3339DateFormatter..

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

up an NSMethodInvocation to handle this as well but doing so requires a lot more typing and is also slower so there's little reason to do it. 1 All Objective C methods have two hidden arguments self and..

Is there a good charting library for iPhone? [closed]

http://stackoverflow.com/questions/769749/is-there-a-good-charting-library-for-iphone

and it doesn't look like there are any really good mature charting libraries for iPhone yet. I've also looked for something written for Cocoa on the Mac that can be adapted but haven't found anything great.. motivated the Core Plot project was the lack of good plotting frameworks on the iPhone. Core Plot also encompases many other use cases including desktop systems but its design has included iPhone support..

UIScrollView horizontal paging like Mobile Safari tabs

http://stackoverflow.com/questions/1220354/uiscrollview-horizontal-paging-like-mobile-safari-tabs

the ClipView 's clipsToBounds is set to YES if its width is less than that of its parent view. Also the ClipView needs a reference to the UIScrollView . The final step is to override UIView hitTest withEvent..

How to develop or migrate apps for iPhone 5 screen resolution?

http://stackoverflow.com/questions/12395200/how-to-develop-or-migrate-apps-for-iphone-5-screen-resolution

bounds if screenBounds.size.height 568 code for 4 inch screen else code for 3.5 inch screen Also note The auto rotation API has changed completely take a look at that as well if your application supports..

How to detect iPhone 5 (widescreen devices)?

http://stackoverflow.com/questions/12446990/how-to-detect-iphone-5-widescreen-devices

a widescreen and we can redefine the IS_IPHONE_5 macro #define IS_IPHONE_5 IS_IPHONE IS_WIDESCREEN Also note that as stated by @LearnCocos2D this macros won't work if the application is not optimised for..

Add UIPickerView & a Button in Action sheet - How?

http://stackoverflow.com/questions/1262574/add-uipickerview-a-button-in-action-sheet-how

SimpleTableViewController.h create an NSArray property that will represent the data in the table. Also in SimpleTableViewController.h create a protocol SimpleTableViewControllerDelegate with a required method..

NSURLConnection timeout?

http://stackoverflow.com/questions/1424608/nsurlconnection-timeout

is a floating point value in seconds as are basically all time intervals in the iPhone SDK. Also make sure your NSURLConnection 's delegate is set and responds to the connection didFailWithError method...

How can I get a writable path on the iPhone?

http://stackoverflow.com/questions/1567134/how-can-i-get-a-writable-path-on-the-iphone

2.0 and so can be used for builds targeting 3.0 or even earlier if you are still doing that . Also the user will not be able to see anything unless you flag an app as allowing users to modify documents..

How can I deploy an iPhone application from Xcode to a real iPhone device?

http://stackoverflow.com/questions/246422/how-can-i-deploy-an-iphone-application-from-xcode-to-a-real-iphone-device

from Cydia and then use it like so ldid S Applications AccelerometerGraph.app AccelerometerGraph Also be sure that the binary is marked as executable chmod x Applications AccelerometerGraph.app AccelerometerGraph..

Easiest way to support multiple orientations? How do I load a custom NIB when the application is in Landscape?

http://stackoverflow.com/questions/2496554/easiest-way-to-support-multiple-orientations-how-do-i-load-a-custom-nib-when-th

with the device in landscape. The NSLog message doesn't fire. Why is this What have I done wrong Also if I explicitly put the initWithNibName function call in the viewDidLoad method that nib is not loaded..

UITextView with Syntax Highlighting [duplicate]

http://stackoverflow.com/questions/3642540/uitextview-with-syntax-highlighting

long texts. UITextInput Protocol Allows interaction with the keyboard and to grab text input . Also features basic text replacements. Problem text input only badly documented. No text selection etc see..

display image from URL retrieved from ALAsset in iPhone

http://stackoverflow.com/questions/3837115/display-image-from-url-retrieved-from-alasset-in-iphone

head a little but if you think of them as notification selectors or callbacks it kind of helps. Also when findLargeImage returns the resultblock wont have run yet as its a callback. So largeImage wont..

How do you beta test an iphone app?

http://stackoverflow.com/questions/40154/how-do-you-beta-test-an-iphone-app

4.0 and later Instructions on wirelessly distributing your application to beta testers . Related Also see this question on getting your app onto phones without using the App Store . iphone ios beta share..

How can I replicate the trashing animation of Mail.app

http://stackoverflow.com/questions/428110/how-can-i-replicate-the-trashing-animation-of-mail-app

iphone cocoa touch share improve this question Use the suckEffect type on an animation. Also spewEffect genieEffect unGenieEffect twist tubey swirl cameraIris cameraIrisHollowClose cameraIrisHollowOpen..

CSS “position: fixed;” into iPad/iPhone?

http://stackoverflow.com/questions/4889601/css-position-fixed-into-ipad-iphone

post that explains the problem http www.quirksmode.org blog archives 2010 12 the_fifth_posit.html Also see this page for a compatibility chart showing which mobile browsers support position fixed http www.quirksmode.org..

What's the easiest way to resize/optimize an image size with the iPhone SDK?

http://stackoverflow.com/questions/612131/whats-the-easiest-way-to-resize-optimize-an-image-size-with-the-iphone-sdk

size I'm planning on resizing the image to something a bit smaller to save on space performance. Also some of those images are JPEGs and they are not saved as the usual 60 quality setting. How can I resize..

Xcode 4 - “Valid signing identity not found” error on provisioning profiles on a new Macintosh install

http://stackoverflow.com/questions/6769345/xcode-4-valid-signing-identity-not-found-error-on-provisioning-profiles-on-a

Profiles under LIBRARY. Then select your provisioning profiles either with the mouse or Command A. Also Apple is making improvements in the way they manage this aspect of Xcode and some users have reported..

Custom UINavigationBar Background

http://stackoverflow.com/questions/704558/custom-uinavigationbar-background

not sure how to implement the code snippet that is given. Is the code implemented as a new class Also where do I instatiate the NavigationController as I have an application built with the NavigationView..

Open source CoverFlow library for iPhone [closed]

http://stackoverflow.com/questions/718984/open-source-coverflow-library-for-iphone

that is licensed per application however I'd much prefer to go the open source route. Also I'm interested in libraries that use only public APIs as using non public APIs might keep an app from..

iPhone Data Usage Tracking/Monitoring

http://stackoverflow.com/questions/7946699/iphone-data-usage-tracking-monitoring

and ifi_ibytes received but I think I should get WiFi usage in ifi_opackets and ifi_ipackets . Also wanted to add that if I'm connected to a WiFi network but am not using internet I still get value added..

Faster alternative to glReadPixels in iPhone OpenGL ES 2.0

http://stackoverflow.com/questions/9550297/faster-alternative-to-glreadpixels-in-iphone-opengl-es-2-0

CVPixelBufferRelease pixel_buffer Note that at no point here am I reading anything manually. Also the textures are natively in BGRA format which is what AVAssetWriters are optimized to use when encoding..

iOS 6 apps - how to deal with iPhone 5 screen size? [duplicate]

http://stackoverflow.com/questions/12396545/ios-6-apps-how-to-deal-with-iphone-5-screen-size

version of the launcher image. It should be named Default 568h@2x.png . And it has to be retina quality there's no backward compatibility here You could also select this image from within Xcode. Go to the target and under the Summary section look for Launch Images. The image has to be 640x1136 pixels in size. Here's..

How to detect iPhone 5 (widescreen devices)?

http://stackoverflow.com/questions/12446990/how-to-detect-iphone-5-widescreen-devices

view controller in the storyboard. Now if I want to create an application that runs on both iPhone 4 and 5 of course I have to build every window twice but I also have to detect whether the user has an iPhone with 3.5 or 4 screen and then apply the view. How should I do that iphone ios objective c screen device share improve.. of iOS so your views can adjust and adapt any screen size. That's not very hard read some documentation about that. It will save you a lot of time. iOS 6 also offers new features about this but this is still under NDA at the moment. Be sure to read the API changelog on Apple Developer website if you can access to it... else Edit Better detection As stated by some people this does only detect a widescreen not an actual iPhone 5. Next versions of the iPod touch will maybe also have such a screen so we may use another set of macros. Let's rename the original macro IS_WIDESCREEN #define IS_WIDESCREEN fabs double UIScreen mainScreen bounds..

Reading ePub format

http://stackoverflow.com/questions/1388467/reading-epub-format

linked above 5 In this XML find the first rootfile with media type application oebps package xml . This is the OPF file for the book. 6 parse the OPF file also XML 7 now you need to know what the first chapter of the book is. a each item in the manifest element has an id and an href. Store these in an NSDictionary where..

AES Encryption for an NSString on the iPhone

http://stackoverflow.com/questions/1400246/aes-encryption-for-an-nsstring-on-the-iphone

certainly has something but I can't make sense of it... I've seen lots of references to CCCrypt but it's failed in every case I've used it. I would also have to be able to decrypt an encrypted string but I hope that's as simple as kCCEncrypt kCCDecrypt. iphone objective c encryption nsstring aes share improve..

How do I detect when someone shakes an iPhone?

http://stackoverflow.com/questions/150446/how-do-i-detect-when-someone-shakes-an-iphone

animated Don't forget that if you have other views that become first responder from user actions like a search bar or text entry field you'll also need to restore the shaking view first responder status when the other view resigns This method works even if you set applicationSupportsShakeToEdit to NO. share..

EXC_BAD_ACCESS signal received

http://stackoverflow.com/questions/327082/exc-bad-access-signal-received

quit after a few cycles with the following error Program received signal EXC_BAD_ACCESS . The program runs without any issue on the iPhone simulator it will also debug and run as long as I step through the instructions one at a time. As soon as I let it run again I will hit the EXC_BAD_ACCESS signal. In this particular case..

How do I apply a perspective transform to a UIView?

http://stackoverflow.com/questions/347721/how-do-i-apply-a-perspective-transform-to-a-uiview

but it does. You'll need to set this value to a negative fraction for your initial transform then apply your layer rotation transforms to that. You should also be able to do the following UIView myView self subviews objectAtIndex 0 CALayer layer myView.layer CATransform3D rotationAndPerspectiveTransform CATransform3DIdentity..

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

EXECUTABLE_NAME CURRENTCONFIG_DEVICE_DIR EXECUTABLE_NAME CURRENTCONFIG_SIMULATOR_DIR EXECUTABLE_NAME ######### # # Added StackOverflow suggestion to also copy include files # untested but should work OK # echo Fetching headers from PUBLIC_HEADERS_FOLDER_PATH echo if you embed your library project in another project.. be exported every time you build the app into a sub directory of the debug universal directory they will be in usr local include OPTIONAL NOTE if you also try to drag drop your project into another Xcode project this exposes a bug in Xcode 4 where it cannot create an .IPA file if you have Public Headers in your drag..

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

showthread.php t 569311 but these would require me to render each glyph myself which is a bit too much like hard work especially for multi line text. I've also found posts that say straight out that it's not possible but without justification so I'm looking for a definitive answer. EDIT failed UIFont fontWithName size..

Gradients on UIView and UILabels On iPhone [duplicate]

http://stackoverflow.com/questions/422066/gradients-on-uiview-and-uilabels-on-iphone

anyone know the quickest way to tackle this Your thoughts are greatly appreciated. iphone ios cocoa touch gradient share improve this question You could also use a graphic image one pixel wide as the gradient and set the view property to expand the graphic to fill the view assuming you are thinking of a simple linear..

How do I get a background location update every n minutes in my iOS application?

http://stackoverflow.com/questions/6347503/how-do-i-get-a-background-location-update-every-n-minutes-in-my-ios-application

minutes but it's not possible to execute some code to get the current location without the user having to launch the app via the notification . This approach also doesn't seem to be a clean approach as this is not what notifications should be used for. UIApplication beginBackgroundTaskWithExpirationHandler As far as I understand.. should be used for. UIApplication beginBackgroundTaskWithExpirationHandler As far as I understand this should be used to finish some work in the background also limited in time when an app is moved to the background rather than implementing long running background processes. How can I implement these regular background..

What is the best way to deal with the NSDateFormatter locale “feature”?

http://stackoverflow.com/questions/6613110/what-is-the-best-way-to-deal-with-the-nsdateformatter-locale-feature

Instead of subclassing you could create an NSDateFormatter category with an additional initializer that takes care of assigning the locale and possibly also a format string so you'd have a ready to use formatter right after initializing it. @interface NSDateFormatter LocaleAdditions id initWithPOSIXLocaleAndFormat NSString.. name conflicts just in case Apple decides to add such a method in a future version of the OS. In case you're always using the same date format s you could also add category methods that return singleton instances with certain configurations something like sharedRFC3339DateFormatter . Be aware however that NSDateFormatter..

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

doesn't handle things properly . More It's possible to build up an NSMethodInvocation to handle this as well but doing so requires a lot more typing and is also slower so there's little reason to do it. 1 All Objective C methods have two hidden arguments self and _cmd that are implicitly added when you call a method. 2..

Is there a good charting library for iPhone? [closed]

http://stackoverflow.com/questions/769749/is-there-a-good-charting-library-for-iphone

an iPhone app I'm working on. I've done some looking around and it doesn't look like there are any really good mature charting libraries for iPhone yet. I've also looked for something written for Cocoa on the Mac that can be adapted but haven't found anything great yet. Anybody dealt with this before Any recommendations I.. share improve this question One of the many factors that motivated the Core Plot project was the lack of good plotting frameworks on the iPhone. Core Plot also encompases many other use cases including desktop systems but its design has included iPhone support from the beginning. It's getting pretty close to useable and..

UIScrollView horizontal paging like Mobile Safari tabs

http://stackoverflow.com/questions/1220354/uiscrollview-horizontal-paging-like-mobile-safari-tabs

the UIScrollView in the center of the ClipView . Make sure the ClipView 's clipsToBounds is set to YES if its width is less than that of its parent view. Also the ClipView needs a reference to the UIScrollView . The final step is to override UIView hitTest withEvent inside the ClipView . UIView hitTest CGPoint point withEvent..

How to develop or migrate apps for iPhone 5 screen resolution?

http://stackoverflow.com/questions/12395200/how-to-develop-or-migrate-apps-for-iphone-5-screen-resolution

API for that. Example CGRect screenBounds UIScreen mainScreen bounds if screenBounds.size.height 568 code for 4 inch screen else code for 3.5 inch screen Also note The auto rotation API has changed completely take a look at that as well if your application supports any rotation other than default. share improve this..

How to detect iPhone 5 (widescreen devices)?

http://stackoverflow.com/questions/12446990/how-to-detect-iphone-5-widescreen-devices

touch This way we can ensure we have an iPhone model AND a widescreen and we can redefine the IS_IPHONE_5 macro #define IS_IPHONE_5 IS_IPHONE IS_WIDESCREEN Also note that as stated by @LearnCocos2D this macros won't work if the application is not optimised for the iPhone 5 screen missing the Default 568h@2x.png image as..

Add UIPickerView & a Button in Action sheet - How?

http://stackoverflow.com/questions/1262574/add-uipickerview-a-button-in-action-sheet-how

a Storyboard ID of SimpleTableVC . In SimpleTableViewController.h create an NSArray property that will represent the data in the table. Also in SimpleTableViewController.h create a protocol SimpleTableViewControllerDelegate with a required method itemSelectedatRow and a weak property called delegate..

NSURLConnection timeout?

http://stackoverflow.com/questions/1424608/nsurlconnection-timeout

parameter if you don't want to worry about that part. The timeout is a floating point value in seconds as are basically all time intervals in the iPhone SDK. Also make sure your NSURLConnection 's delegate is set and responds to the connection didFailWithError method. A connection always calls either this method or connectionDidFinishLoading..

How can I get a writable path on the iPhone?

http://stackoverflow.com/questions/1567134/how-can-i-get-a-writable-path-on-the-iphone

NSLibraryDirectory constant has been available since iPhoneOS 2.0 and so can be used for builds targeting 3.0 or even earlier if you are still doing that . Also the user will not be able to see anything unless you flag an app as allowing users to modify documents so if you are using Documents today you are fine as long..

How can I deploy an iPhone application from Xcode to a real iPhone device?

http://stackoverflow.com/questions/246422/how-can-i-deploy-an-iphone-application-from-xcode-to-a-real-iphone-device

Easiest way to support multiple orientations? How do I load a custom NIB when the application is in Landscape?

http://stackoverflow.com/questions/2496554/easiest-way-to-support-multiple-orientations-how-do-i-load-a-custom-nib-when-th

see in gdb that this isn't executed when the app is started with the device in landscape. The NSLog message doesn't fire. Why is this What have I done wrong Also if I explicitly put the initWithNibName function call in the viewDidLoad method that nib is not loaded and it continues with the myViewController.xib file. What's..

UITextView with Syntax Highlighting [duplicate]

http://stackoverflow.com/questions/3642540/uitextview-with-syntax-highlighting

And quite a bit of work to make it fast on old devices with long texts. UITextInput Protocol Allows interaction with the keyboard and to grab text input . Also features basic text replacements. Problem text input only badly documented. No text selection etc see above . So here we are. Two fully functional components that..

display image from URL retrieved from ALAsset in iPhone

http://stackoverflow.com/questions/3837115/display-image-from-url-retrieved-from-alasset-in-iphone

Conceptual Blocks Articles 00_Introduction.html They bend your head a little but if you think of them as notification selectors or callbacks it kind of helps. Also when findLargeImage returns the resultblock wont have run yet as its a callback. So largeImage wont be valid yet. largeImage needs to be an instance variable not..

How do you beta test an iphone app?

http://stackoverflow.com/questions/40154/how-do-you-beta-test-an-iphone-app

limited release via the app store for beta testing Answer iOS 4.0 and later Instructions on wirelessly distributing your application to beta testers . Related Also see this question on getting your app onto phones without using the App Store . iphone ios beta share improve this question Creating ad hoc distribution profiles..

How can I replicate the trashing animation of Mail.app

http://stackoverflow.com/questions/428110/how-can-i-replicate-the-trashing-animation-of-mail-app

bin itself. Do you have any suggestion Code samples Cheers Davide iphone cocoa touch share improve this question Use the suckEffect type on an animation. Also spewEffect genieEffect unGenieEffect twist tubey swirl cameraIris cameraIrisHollowClose cameraIrisHollowOpen rippleEffect charminUltra zoomyIn and zoomyOut. Doesn't..

CSS “position: fixed;” into iPad/iPhone?

http://stackoverflow.com/questions/4889601/css-position-fixed-into-ipad-iphone

a small screen. The Quirksmode.org site has a very good blog post that explains the problem http www.quirksmode.org blog archives 2010 12 the_fifth_posit.html Also see this page for a compatibility chart showing which mobile browsers support position fixed http www.quirksmode.org m css.html but note that the mobile browser..

What's the easiest way to resize/optimize an image size with the iPhone SDK?

http://stackoverflow.com/questions/612131/whats-the-easiest-way-to-resize-optimize-an-image-size-with-the-iphone-sdk

have a big enough display to show the image in its original size I'm planning on resizing the image to something a bit smaller to save on space performance. Also some of those images are JPEGs and they are not saved as the usual 60 quality setting. How can I resize a picture with the iPhone SDK and how can I change the quality..

Xcode 4 - “Valid signing identity not found” error on provisioning profiles on a new Macintosh install

http://stackoverflow.com/questions/6769345/xcode-4-valid-signing-identity-not-found-error-on-provisioning-profiles-on-a

for Xcode 4.4 With Xcode 4.4 at step 3 choose Provisioning Profiles under LIBRARY. Then select your provisioning profiles either with the mouse or Command A. Also Apple is making improvements in the way they manage this aspect of Xcode and some users have reported that the Refresh button in the lower right corner does the..

Custom UINavigationBar Background

http://stackoverflow.com/questions/704558/custom-uinavigationbar-background

thread.jspa threadID 1649012 tstart 0 But am not sure how to implement the code snippet that is given. Is the code implemented as a new class Also where do I instatiate the NavigationController as I have an application built with the NavigationView template so it is not done in my root controller as per the..

Open source CoverFlow library for iPhone [closed]

http://stackoverflow.com/questions/718984/open-source-coverflow-library-for-iphone

APIs or libraries available for the iPhone I've found one implementation that is licensed per application however I'd much prefer to go the open source route. Also I'm interested in libraries that use only public APIs as using non public APIs might keep an app from getting published in the App Store. iphone coverflow share..

iPhone Data Usage Tracking/Monitoring

http://stackoverflow.com/questions/7946699/iphone-data-usage-tracking-monitoring

or through 3G I get the the data bytes only in ifi_obytes sent and ifi_ibytes received but I think I should get WiFi usage in ifi_opackets and ifi_ipackets . Also wanted to add that if I'm connected to a WiFi network but am not using internet I still get value added to ifi_obytes and ifi_ibytes . May be I'm wrong in the implementation..

Faster alternative to glReadPixels in iPhone OpenGL ES 2.0

http://stackoverflow.com/questions/9550297/faster-alternative-to-glreadpixels-in-iphone-opengl-es-2-0

0 if GPUImageOpenGLESContext supportsFastTextureUpload CVPixelBufferRelease pixel_buffer Note that at no point here am I reading anything manually. Also the textures are natively in BGRA format which is what AVAssetWriters are optimized to use when encoding video so there's no need to do any color swizzling here...

iOS 6 apps - how to deal with iPhone 5 screen size? [duplicate]

http://stackoverflow.com/questions/12396545/ios-6-apps-how-to-deal-with-iphone-5-screen-size

should be named Default 568h@2x.png . And it has to be retina quality there's no backward compatibility here You could also select this image from within Xcode. Go to the target and under the Summary section look for Launch Images. The image has..

How to detect iPhone 5 (widescreen devices)?

http://stackoverflow.com/questions/12446990/how-to-detect-iphone-5-widescreen-devices

if I want to create an application that runs on both iPhone 4 and 5 of course I have to build every window twice but I also have to detect whether the user has an iPhone with 3.5 or 4 screen and then apply the view. How should I do that iphone.. adapt any screen size. That's not very hard read some documentation about that. It will save you a lot of time. iOS 6 also offers new features about this but this is still under NDA at the moment. Be sure to read the API changelog on Apple Developer.. by some people this does only detect a widescreen not an actual iPhone 5. Next versions of the iPod touch will maybe also have such a screen so we may use another set of macros. Let's rename the original macro IS_WIDESCREEN #define IS_WIDESCREEN..

Reading ePub format

http://stackoverflow.com/questions/1388467/reading-epub-format

first rootfile with media type application oebps package xml . This is the OPF file for the book. 6 parse the OPF file also XML 7 now you need to know what the first chapter of the book is. a each item in the manifest element has an id and an href...

AES Encryption for an NSString on the iPhone

http://stackoverflow.com/questions/1400246/aes-encryption-for-an-nsstring-on-the-iphone

can't make sense of it... I've seen lots of references to CCCrypt but it's failed in every case I've used it. I would also have to be able to decrypt an encrypted string but I hope that's as simple as kCCEncrypt kCCDecrypt. iphone objective c..

How do I detect when someone shakes an iPhone?

http://stackoverflow.com/questions/150446/how-do-i-detect-when-someone-shakes-an-iphone

if you have other views that become first responder from user actions like a search bar or text entry field you'll also need to restore the shaking view first responder status when the other view resigns This method works even if you set applicationSupportsShakeToEdit..

EXC_BAD_ACCESS signal received

http://stackoverflow.com/questions/327082/exc-bad-access-signal-received

error Program received signal EXC_BAD_ACCESS . The program runs without any issue on the iPhone simulator it will also debug and run as long as I step through the instructions one at a time. As soon as I let it run again I will hit the EXC_BAD_ACCESS..

How do I apply a perspective transform to a UIView?

http://stackoverflow.com/questions/347721/how-do-i-apply-a-perspective-transform-to-a-uiview

value to a negative fraction for your initial transform then apply your layer rotation transforms to that. You should also be able to do the following UIView myView self subviews objectAtIndex 0 CALayer layer myView.layer CATransform3D rotationAndPerspectiveTransform..

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

EXECUTABLE_NAME CURRENTCONFIG_SIMULATOR_DIR EXECUTABLE_NAME ######### # # Added StackOverflow suggestion to also copy include files # untested but should work OK # echo Fetching headers from PUBLIC_HEADERS_FOLDER_PATH echo if you embed.. the app into a sub directory of the debug universal directory they will be in usr local include OPTIONAL NOTE if you also try to drag drop your project into another Xcode project this exposes a bug in Xcode 4 where it cannot create an .IPA file..

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

require me to render each glyph myself which is a bit too much like hard work especially for multi line text. I've also found posts that say straight out that it's not possible but without justification so I'm looking for a definitive answer...

Gradients on UIView and UILabels On iPhone [duplicate]

http://stackoverflow.com/questions/422066/gradients-on-uiview-and-uilabels-on-iphone

this Your thoughts are greatly appreciated. iphone ios cocoa touch gradient share improve this question You could also use a graphic image one pixel wide as the gradient and set the view property to expand the graphic to fill the view assuming..

How do I get a background location update every n minutes in my iOS application?

http://stackoverflow.com/questions/6347503/how-do-i-get-a-background-location-update-every-n-minutes-in-my-ios-application

some code to get the current location without the user having to launch the app via the notification . This approach also doesn't seem to be a clean approach as this is not what notifications should be used for. UIApplication beginBackgroundTaskWithExpirationHandler.. As far as I understand this should be used to finish some work in the background also limited in time when an app is moved to the background rather than implementing long running background processes. How can..

What is the best way to deal with the NSDateFormatter locale “feature”?

http://stackoverflow.com/questions/6613110/what-is-the-best-way-to-deal-with-the-nsdateformatter-locale-feature

create an NSDateFormatter category with an additional initializer that takes care of assigning the locale and possibly also a format string so you'd have a ready to use formatter right after initializing it. @interface NSDateFormatter LocaleAdditions.. to add such a method in a future version of the OS. In case you're always using the same date format s you could also add category methods that return singleton instances with certain configurations something like sharedRFC3339DateFormatter..

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

It's possible to build up an NSMethodInvocation to handle this as well but doing so requires a lot more typing and is also slower so there's little reason to do it. 1 All Objective C methods have two hidden arguments self and _cmd that are implicitly..

Is there a good charting library for iPhone? [closed]

http://stackoverflow.com/questions/769749/is-there-a-good-charting-library-for-iphone

some looking around and it doesn't look like there are any really good mature charting libraries for iPhone yet. I've also looked for something written for Cocoa on the Mac that can be adapted but haven't found anything great yet. Anybody dealt.. many factors that motivated the Core Plot project was the lack of good plotting frameworks on the iPhone. Core Plot also encompases many other use cases including desktop systems but its design has included iPhone support from the beginning...

UIScrollView horizontal paging like Mobile Safari tabs

http://stackoverflow.com/questions/1220354/uiscrollview-horizontal-paging-like-mobile-safari-tabs

ClipView . Make sure the ClipView 's clipsToBounds is set to YES if its width is less than that of its parent view. Also the ClipView needs a reference to the UIScrollView . The final step is to override UIView hitTest withEvent inside the ClipView..

How to develop or migrate apps for iPhone 5 screen resolution?

http://stackoverflow.com/questions/12395200/how-to-develop-or-migrate-apps-for-iphone-5-screen-resolution

UIScreen mainScreen bounds if screenBounds.size.height 568 code for 4 inch screen else code for 3.5 inch screen Also note The auto rotation API has changed completely take a look at that as well if your application supports any rotation..

How to detect iPhone 5 (widescreen devices)?

http://stackoverflow.com/questions/12446990/how-to-detect-iphone-5-widescreen-devices

an iPhone model AND a widescreen and we can redefine the IS_IPHONE_5 macro #define IS_IPHONE_5 IS_IPHONE IS_WIDESCREEN Also note that as stated by @LearnCocos2D this macros won't work if the application is not optimised for the iPhone 5 screen..

Add UIPickerView & a Button in Action sheet - How?

http://stackoverflow.com/questions/1262574/add-uipickerview-a-button-in-action-sheet-how

SimpleTableVC . In SimpleTableViewController.h create an NSArray property that will represent the data in the table. Also in SimpleTableViewController.h create a protocol SimpleTableViewControllerDelegate with a required method itemSelectedatRow..

NSURLConnection timeout?

http://stackoverflow.com/questions/1424608/nsurlconnection-timeout

that part. The timeout is a floating point value in seconds as are basically all time intervals in the iPhone SDK. Also make sure your NSURLConnection 's delegate is set and responds to the connection didFailWithError method. A connection always..

How can I get a writable path on the iPhone?

http://stackoverflow.com/questions/1567134/how-can-i-get-a-writable-path-on-the-iphone

available since iPhoneOS 2.0 and so can be used for builds targeting 3.0 or even earlier if you are still doing that . Also the user will not be able to see anything unless you flag an app as allowing users to modify documents so if you are using..

How can I deploy an iPhone application from Xcode to a real iPhone device?

http://stackoverflow.com/questions/246422/how-can-i-deploy-an-iphone-application-from-xcode-to-a-real-iphone-device

signed. Download ldid from Cydia and then use it like so ldid S Applications AccelerometerGraph.app AccelerometerGraph Also be sure that the binary is marked as executable chmod x Applications AccelerometerGraph.app AccelerometerGraph share improve..

UITextView with Syntax Highlighting [duplicate]

http://stackoverflow.com/questions/3642540/uitextview-with-syntax-highlighting

on old devices with long texts. UITextInput Protocol Allows interaction with the keyboard and to grab text input . Also features basic text replacements. Problem text input only badly documented. No text selection etc see above . So here we..

display image from URL retrieved from ALAsset in iPhone

http://stackoverflow.com/questions/3837115/display-image-from-url-retrieved-from-alasset-in-iphone

They bend your head a little but if you think of them as notification selectors or callbacks it kind of helps. Also when findLargeImage returns the resultblock wont have run yet as its a callback. So largeImage wont be valid yet. largeImage..

How do you beta test an iphone app?

http://stackoverflow.com/questions/40154/how-do-you-beta-test-an-iphone-app

testing Answer iOS 4.0 and later Instructions on wirelessly distributing your application to beta testers . Related Also see this question on getting your app onto phones without using the App Store . iphone ios beta share improve this question..

How can I replicate the trashing animation of Mail.app

http://stackoverflow.com/questions/428110/how-can-i-replicate-the-trashing-animation-of-mail-app

samples Cheers Davide iphone cocoa touch share improve this question Use the suckEffect type on an animation. Also spewEffect genieEffect unGenieEffect twist tubey swirl cameraIris cameraIrisHollowClose cameraIrisHollowOpen rippleEffect..

CSS “position: fixed;” into iPad/iPhone?

http://stackoverflow.com/questions/4889601/css-position-fixed-into-ipad-iphone

has a very good blog post that explains the problem http www.quirksmode.org blog archives 2010 12 the_fifth_posit.html Also see this page for a compatibility chart showing which mobile browsers support position fixed http www.quirksmode.org m css.html..

What's the easiest way to resize/optimize an image size with the iPhone SDK?

http://stackoverflow.com/questions/612131/whats-the-easiest-way-to-resize-optimize-an-image-size-with-the-iphone-sdk

image in its original size I'm planning on resizing the image to something a bit smaller to save on space performance. Also some of those images are JPEGs and they are not saved as the usual 60 quality setting. How can I resize a picture with the..

Xcode 4 - “Valid signing identity not found” error on provisioning profiles on a new Macintosh install

http://stackoverflow.com/questions/6769345/xcode-4-valid-signing-identity-not-found-error-on-provisioning-profiles-on-a

choose Provisioning Profiles under LIBRARY. Then select your provisioning profiles either with the mouse or Command A. Also Apple is making improvements in the way they manage this aspect of Xcode and some users have reported that the Refresh button..

Custom UINavigationBar Background

http://stackoverflow.com/questions/704558/custom-uinavigationbar-background

tstart 0 But am not sure how to implement the code snippet that is given. Is the code implemented as a new class Also where do I instatiate the NavigationController as I have an application built with the NavigationView template so it is..

Open source CoverFlow library for iPhone [closed]

http://stackoverflow.com/questions/718984/open-source-coverflow-library-for-iphone

I've found one implementation that is licensed per application however I'd much prefer to go the open source route. Also I'm interested in libraries that use only public APIs as using non public APIs might keep an app from getting published..

iPhone Data Usage Tracking/Monitoring

http://stackoverflow.com/questions/7946699/iphone-data-usage-tracking-monitoring

only in ifi_obytes sent and ifi_ibytes received but I think I should get WiFi usage in ifi_opackets and ifi_ipackets . Also wanted to add that if I'm connected to a WiFi network but am not using internet I still get value added to ifi_obytes and..

Faster alternative to glReadPixels in iPhone OpenGL ES 2.0

http://stackoverflow.com/questions/9550297/faster-alternative-to-glreadpixels-in-iphone-opengl-es-2-0

supportsFastTextureUpload CVPixelBufferRelease pixel_buffer Note that at no point here am I reading anything manually. Also the textures are natively in BGRA format which is what AVAssetWriters are optimized to use when encoding video so there's..