¡@

Home 

2014/10/15 ¤U¤È 10:10:07

iphone Programming Glossary: however

How to programmatically send SMS on the iPhone?

http://stackoverflow.com/questions/10848/how-to-programmatically-send-sms-on-the-iphone

to using this controller or risk restricting your app to recently upgraded 3G 3GS and 4 iPhones. However an intermediate server that sends SMS will allow any and all of these iOS devices to send SMS as long..

Detect the specific iPhone/iPod touch model [duplicate]

http://stackoverflow.com/questions/1108859/detect-the-specific-iphone-ipod-touch-model

the peer to peer bluetooth capabilities of the iPhone and probably the iPod touch 2nd generation . However to stop the users from trying to play a multiplayer on an iPod 1st gen and iPhone 2G I need to check..

How to make a UITextField move up when keyboard is present

http://stackoverflow.com/questions/1126726/how-to-make-a-uitextfield-move-up-when-keyboard-is-present

scrollView.frame.origin.y scrollView.frame.size.width scrollView.frame.size.height 215 50 resize However this doesn't automatically move up or center the lower text fields in the visible area which is what..

UIImagePickerController and extracting EXIF data from existing photos

http://stackoverflow.com/questions/1238838/uiimagepickercontroller-and-extracting-exif-data-from-existing-photos

well known that UIImagePickerController doesn't return the metadata of the photo after selection. However a couple of apps in the app store Mobile Fotos PixelPipe seem to be able to read the original files.. from the private var mobile Media DCIM 100APPLE folder and running it through an EXIF library. However I can't work out a way of matching a photo returned from the UIImagePickerController to a file on disk... the iPhone exif library. UPDATE I gave a test to the library mentioned above and it seems to work. However because of my limited knwoledge about the EXIF format and the lack of high level API in the library..

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

constraints to lay things out. Nothing will be hard coded and your life will become a lot simpler. However if you have to support older iOS's then it really depends on your application. A majority of applications..

AES Encryption for an NSString on the iPhone

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

you haven't posted any code it's difficult to know exactly which problems you're encountering. However the blog post you link to does seem to work pretty decently... aside from the extra comma in each call..

How to access SOAP services from iPhone

http://stackoverflow.com/questions/204465/how-to-access-soap-services-from-iphone

on libxml2 which is included in the iPhone SDK . I've written my own SOAP framework for OSX. However it is not actively maintained and will require some time to port to the iPhone you'll need to replace..

iPhone ivar naming convention [duplicate]

http://stackoverflow.com/questions/2114587/iphone-ivar-naming-convention

noted to avoid conflict with incoming parameter names. Even in Apple sample code the use is mixed. However I greatly prefer to not use the _ prefix and have two strong reasons 1 Some people think the _ is a..

EXC_BAD_ACCESS signal received

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

code. It would not execute within the simulator which is why it did not throw any errors. However it would execute once deployed to the device. Most of the answers to this question deal with the general..

Check iPhone iOS Version

http://stackoverflow.com/questions/3339722/check-iphone-ios-version

improve this question You can get the OS version using UIDevice currentDevice systemVersion However you should avoid relying on the version string as an indication of device or OS capabilities. There..

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

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..

Getting current device language in iOS?

http://stackoverflow.com/questions/3910244/getting-current-device-language-in-ios

region of the device not the currently selected language. These are often one and the same. However if I am in North America and I set my language to Japanese my region will still be English United States..

“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

a required architecture. At least one of the following architecture s must be present armv6 19033 However in my project I thought I had things set correctly Architectures is Standard armv6 armv7 Base SDK Latest..

iOS SDK - Programmatically generate a PDF file

http://stackoverflow.com/questions/4362734/ios-sdk-programmatically-generate-a-pdf-file

to display the PDF on the iPhone or Mac desktops then you should be fine using CoreGraphics . However if you need to create a PDF that works anywhere then you should take a closer look at this issue. Here's..

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

you have in play. EDIT @cocoanetics pointed out that IPCU is not required to remove the profile. However note that to get your device back to normal you would need to do the following Reboot Open the settings..

What's the best way to communicate between view controllers?

http://stackoverflow.com/questions/569940/whats-the-best-way-to-communicate-between-view-controllers

the UINavigationController stack. That's how the UINavigationController works. That's logical. However there are some stern warnings in the slide about communicating between your UIViewControllers. I'm going..

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

fastest image format to use with the iPhone is PNG because it has optimizations for that format. However if you want to store these images as JPEGs you can take your UIImage and do the following NSData dataForJPEGFile..

UIDevice uniqueIdentifier Deprecated - What To Do Now?

http://stackoverflow.com/questions/6993325/uidevice-uniqueidentifier-deprecated-what-to-do-now

function to create a UUID and write it to the defaults database using the NSUserDefaults class. However this value won't be the same if a user uninstalls and re installs the app. iphone ios ipad share..

Dispelling the UIImage imageNamed: FUD

http://stackoverflow.com/questions/924740/dispelling-the-uiimage-imagenamed-fud

to have a cached version of the image hanging around and likely for longer than you need it. However if you do have a large image that you need to redraw often then there are alternatives although the..

Is there any ready-made calendar control for iPhone apps?

http://stackoverflow.com/questions/997779/is-there-any-ready-made-calendar-control-for-iphone-apps

the one displayed in the month view in the built in Calendar application would be a best match. However the iPhone Human Interface Guidelines just mentions the Date Picker not the calendar so I believe there..

How to programmatically send SMS on the iPhone?

http://stackoverflow.com/questions/10848/how-to-programmatically-send-sms-on-the-iphone

on the iPhone sends a UDP packet to your server which sends the real SMS iOS 4 Update iOS 4 however now provides a viewcontroller you can import into your application. You prepopulate the SMS fields then..

Setting action for back button in navigation controller

http://stackoverflow.com/questions/1214965/setting-action-for-back-button-in-navigation-controller

As soon as I set it through the leftBarButtonItem on the navigationItem it calls my action however then the button looks like a plain round one instead of the arrowed back one self.navigationItem.leftBarButtonItem..

UIScrollView horizontal paging like Mobile Safari tabs

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

you want your pages to be. Make that the width of the UIScrollView . Then set your subview's sizes however big you need them to be and set their centers based on multiples of the UIScrollView 's width. Then.. UIScrollView and override its BOOL pointInside CGPoint point withEvent UIEvent event method however you will still need a container view to do the clipping and it may be difficult to determine when to..

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

UIViewAutoresizingFlexibleHeight It works great out of the box for table views however if your app used pixel perfect layout for displaying content then your best bet would be to re imagine..

Where to place the “Core Data Stack” in a Cocoa/Cocoa Touch application

http://stackoverflow.com/questions/1267520/where-to-place-the-core-data-stack-in-a-cocoa-cocoa-touch-application

Core Data Template Apple places the Core Data Stack in the App Delegate. My initial inclination however is to move this code into it's own class whose responsibility is to handle the management of the Core.. productive. The Core Data stack happens to be created by the application delegate. Importantly however as all the examples show the stack principally the managed object context is not retrieved directly..

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

on this 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..

How to add a UIImage in MailComposer Sheet of MFMailComposeViewController

http://stackoverflow.com/questions/1527351/how-to-add-a-uiimage-in-mailcomposer-sheet-of-mfmailcomposeviewcontroller

emailBody NSMutableString alloc initWithString @ html body retain Add some text to it however you want emailBody appendString @ p Some email body text can go here p Pick an image to insert This..

iPhone and OpenCV

http://stackoverflow.com/questions/348040/iphone-and-opencv

and OpenCV I know that OpenCV was ported to Mac OS X however I did not find any info about a port to the iPhone. I am not a Mac developer so that I do not know whether..

Inner shadow effect on UIView layer?

http://stackoverflow.com/questions/4431292/inner-shadow-effect-on-uiview-layer

to it but I am not quite sure how to do this. I suppose I would be required to draw in drawRect however this would add the layer on top of other UIView objects since it's supposed to be a bar behind some..

OpenGL Texture Coordinates in Pixel Space

http://stackoverflow.com/questions/5879403/opengl-texture-coordinates-in-pixel-space

the bars the edges of the texture and in case of nearest filtering the border between pixels. You however want to hit the pixels' centers. So you're interested in the texture coordinates 0 8 1 8 2 1 2 8 1 8..

Understanding reference counting with Cocoa and Objective-C

http://stackoverflow.com/questions/6578/understanding-reference-counting-with-cocoa-and-objective-c

shouldn't be responsible for releasing it since we're the ones that created it. If we call release however the reference count will hit zero and bad memory will be returned to the caller. The answer is to call..

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

instances with certain configurations something like sharedRFC3339DateFormatter . Be aware however that NSDateFormatter is not thread safe and you have to use locks or @synchronized blocks when you're..

Open source CoverFlow library for iPhone [closed]

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

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..

iPhone Data Usage Tracking/Monitoring

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

on a process by process basis. As such there's no exact solution to this problem. You can however get network statistics for each network interface. In general en0 is your Wi Fi interface and pdp_ip0..

Animate change of view controllers without using navigation controller stack, subviews or modal controllers?

http://stackoverflow.com/questions/8146253/animate-change-of-view-controllers-without-using-navigation-controller-stack-su

eliminating the need for the TransitionController class. The logic you'd need would be the same however. Use it as follows In your app delegate add a property for the TransitionController BOOL application..

How to target a specific iPhone version?

http://stackoverflow.com/questions/820142/how-to-target-a-specific-iphone-version

a specific iPhone version I've got some code I want to only execute on the latest iPhone SDK 3.0 however I can't seem to figure out a way to target just 3.0 and ignore 2.2.1 etc. There is an ifdef statement..

Having trouble adding objects to NSMutableArray in Objective C

http://stackoverflow.com/questions/851926/having-trouble-adding-objects-to-nsmutablearray-in-objective-c

NSMutableArray instance variable. I tried adding NSNumber card to NSMutableArray viewedCardsArray however without breaking it does not get added to the array. Here is the code. Inside the header file Class.h..

Reading HTML content from a UIWebView

http://stackoverflow.com/questions/992348/reading-html-content-from-a-uiwebview

encoding NSASCIIStringEncoding error &error EDIT Both these methods take a performance hit however since they do the request twice. You can get around this by grabbing the content from a currently loaded.. held on to the NSURL you requested yourWebView loadHTMLString page baseURL requestURL I'm not sure however if this will run Javascript found in the page you load the method name loadHTMLString is somewhat ambiguous..

How to programmatically send SMS on the iPhone?

http://stackoverflow.com/questions/10848/how-to-programmatically-send-sms-on-the-iphone

You must either detect the device and iOS limitations prior to using this controller or risk restricting your app to recently upgraded 3G 3GS and 4 iPhones. However an intermediate server that sends SMS will allow any and all of these iOS devices to send SMS as long as they have internet access so it may still be a better solution..

Detect the specific iPhone/iPod touch model [duplicate]

http://stackoverflow.com/questions/1108859/detect-the-specific-iphone-ipod-touch-model

iPod Touch with iPhone SDK I am making a game that utilizes the peer to peer bluetooth capabilities of the iPhone and probably the iPod touch 2nd generation . However to stop the users from trying to play a multiplayer on an iPod 1st gen and iPhone 2G I need to check for the specific device model. UIDevice currentDevice model..

How to make a UITextField move up when keyboard is present

http://stackoverflow.com/questions/1126726/how-to-make-a-uitextfield-move-up-when-keyboard-is-present

hide scrollView.frame CGRectMake scrollView.frame.origin.x scrollView.frame.origin.y scrollView.frame.size.width scrollView.frame.size.height 215 50 resize However this doesn't automatically move up or center the lower text fields in the visible area which is what I would really like. iphone objective c ios share improve..

UIImagePickerController and extracting EXIF data from existing photos

http://stackoverflow.com/questions/1238838/uiimagepickercontroller-and-extracting-exif-data-from-existing-photos

and extracting EXIF data from existing photos It's well known that UIImagePickerController doesn't return the metadata of the photo after selection. However a couple of apps in the app store Mobile Fotos PixelPipe seem to be able to read the original files and the EXIF data stored within them enabling the app to extract.. photo. They seem to do this by reading the original file from the private var mobile Media DCIM 100APPLE folder and running it through an EXIF library. However I can't work out a way of matching a photo returned from the UIImagePickerController to a file on disk. I've explored file sizes but the original file is a JPEG.. the UIImage into a NSData instance and then use it with the iPhone exif library. UPDATE I gave a test to the library mentioned above and it seems to work. However because of my limited knwoledge about the EXIF format and the lack of high level API in the library I don't manage to get the values for the EXIF tags. Here's my..

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

It removes all fixed layout handling and instead uses constraints to lay things out. Nothing will be hard coded and your life will become a lot simpler. However if you have to support older iOS's then it really depends on your application. A majority of applications that use a standard navigation bar and or tab bar could..

AES Encryption for an NSString on the iPhone

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

c encryption nsstring aes share improve this question Since you haven't posted any code it's difficult to know exactly which problems you're encountering. However the blog post 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..

How to access SOAP services from iPhone

http://stackoverflow.com/questions/204465/how-to-access-soap-services-from-iphone

into SOAP for you You could try CSOAP a SOAP library that depends on libxml2 which is included in the iPhone SDK . I've written my own SOAP framework for OSX. However it is not actively maintained and will require some time to port to the iPhone you'll need to replace NSXML with TouchXML for a start share improve this answer..

iPhone ivar naming convention [duplicate]

http://stackoverflow.com/questions/2114587/iphone-ivar-naming-convention

to separate out class variables and as another responder noted to avoid conflict with incoming parameter names. Even in Apple sample code the use is mixed. However I greatly prefer to not use the _ prefix and have two strong reasons 1 Some people think the _ is a good indicator of private . My take is that NO class local variable..

EXC_BAD_ACCESS signal received

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

this particular case it happened to be an error in the accelerometer code. It would not execute within the simulator which is why it did not throw any errors. However it would execute once deployed to the device. Most of the answers to this question deal with the general EXC_BAD_ACCESS error so I will leave this open as a catch..

Check iPhone iOS Version

http://stackoverflow.com/questions/3339722/check-iphone-ios-version

a if version 3.1.3 How can I do this iphone version ios share improve this question You can get the OS version using UIDevice currentDevice systemVersion However you should avoid relying on the version string as an indication of device or OS capabilities. There is usually a more reliable method of checking whether a particular..

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 are NOT configured to do this. I'm looking for a simple portable re usable technique..

Getting current device language in iOS?

http://stackoverflow.com/questions/3910244/getting-current-device-language-in-ios

question The solutions provided will actually return the current region of the device not the currently selected language. These are often one and the same. However if I am in North America and I set my language to Japanese my region will still be English United States . In order to retrieve the currently selected language..

“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

armv7 iPhone iPod Touch application executable is missing a required architecture. At least one of the following architecture s must be present armv6 19033 However in my project I thought I had things set correctly Architectures is Standard armv6 armv7 Base SDK Latest iOS currently set to iOS 4.2 Valid Architectures armv6..

iOS SDK - Programmatically generate a PDF file

http://stackoverflow.com/questions/4362734/ios-sdk-programmatically-generate-a-pdf-file

PDF you may be able to ignore this issue e.g. if you only intend to display the PDF on the iPhone or Mac desktops then you should be fine using CoreGraphics . However if you need to create a PDF that works anywhere then you should take a closer look at this issue. Here's some additional info http www.iphonedevsdk.com forum iphone..

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

this with whatever other enterprise configuration profiles you have in play. EDIT @cocoanetics pointed out that IPCU is not required to remove the profile. However note that to get your device back to normal you would need to do the following Reboot Open the settings app FIRST don't open anything else or you will need to reboot..

What's the best way to communicate between view controllers?

http://stackoverflow.com/questions/569940/whats-the-best-way-to-communicate-between-view-controllers

based app that has multiple UIViewControllers pushed onto the UINavigationController stack. That's how the UINavigationController works. That's logical. However there are some stern warnings in the slide about communicating between your UIViewControllers. I'm going to quote from this serious of slides http cs193p.stanford.edu..

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

return newImage As far as storage of the image the fastest image format to use with the iPhone is PNG because it has optimizations for that format. However if you want to store these images as JPEGs you can take your UIImage and do the following NSData dataForJPEGFile UIImageJPEGRepresentation theImage 0.6 This creates..

UIDevice uniqueIdentifier Deprecated - What To Do Now?

http://stackoverflow.com/questions/6993325/uidevice-uniqueidentifier-deprecated-what-to-do-now

identifier specific to your app you can call the CFUUIDCreate function to create a UUID and write it to the defaults database using the NSUserDefaults class. However this value won't be the same if a user uninstalls and re installs the app. iphone ios ipad share improve this question A UUID created by CFUUIDCreate is unique..

Dispelling the UIImage imageNamed: FUD

http://stackoverflow.com/questions/924740/dispelling-the-uiimage-imagenamed-fud

you only need the image data once you've won nothing here except to have a cached version of the image hanging around and likely for longer than you need it. However if you do have a large image that you need to redraw often then there are alternatives although the one I would recommend primarily is to avoid redrawing that large..

Is there any ready-made calendar control for iPhone apps?

http://stackoverflow.com/questions/997779/is-there-any-ready-made-calendar-control-for-iphone-apps

for a list view but then I realized that a calendar just like the one displayed in the month view in the built in Calendar application would be a best match. However the iPhone Human Interface Guidelines just mentions the Date Picker not the calendar so I believe there is nothing like that out of the box. Is that true If so..

How to programmatically send SMS on the iPhone?

http://stackoverflow.com/questions/10848/how-to-programmatically-send-sms-on-the-iphone

via that route if you need complete automation. ie your program on the iPhone sends a UDP packet to your server which sends the real SMS iOS 4 Update iOS 4 however now provides a viewcontroller you can import into your application. You prepopulate the SMS fields then the user can initiate the SMS send within the controller...

Setting action for back button in navigation controller

http://stackoverflow.com/questions/1214965/setting-action-for-back-button-in-navigation-controller

@selector home self.navigationItem.backBarButtonItem backButton As soon as I set it through the leftBarButtonItem on the navigationItem it calls my action however then the button looks like a plain round one instead of the arrowed back one self.navigationItem.leftBarButtonItem backButton How can I get it to call my custom..

UIScrollView horizontal paging like Mobile Safari tabs

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

or height . So the first step is to figure out how wide you want your pages to be. Make that the width of the UIScrollView . Then set your subview's sizes however big you need them to be and set their centers based on multiples of the UIScrollView 's width. Then since you want to see the other pages of course set clipsToBounds.. view exactly what you need. Another option would be to subclass UIScrollView and override its BOOL pointInside CGPoint point withEvent UIEvent event method however you will still need a container view to do the clipping and it may be difficult to determine when to return YES based only on the UIScrollView 's frame. NOTE You..

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

in both directions. view.autoresizingMask UIViewAutoresizingFlexibleWidth UIViewAutoresizingFlexibleHeight It works great out of the box for table views however if your app used pixel perfect layout for displaying content then your best bet would be to re imagine the content so that it can accommodate varying heights. If..

Where to place the “Core Data Stack” in a Cocoa/Cocoa Touch application

http://stackoverflow.com/questions/1267520/where-to-place-the-core-data-stack-in-a-cocoa-cocoa-touch-application

Stack&rdquo in a Cocoa Cocoa Touch application In the iPhone Core Data Template Apple places the Core Data Stack in the App Delegate. My initial inclination however is to move this code into it's own class whose responsibility is to handle the management of the Core Data Stack. Do you typically encapsulate this functionality.. the Core Data stack indeed doing so is likely to be counter productive. The Core Data stack happens to be created by the application delegate. Importantly however as all the examples show the stack principally the managed object context is not retrieved directly from the stack . Instead the context is passed to the first..

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

with a consolidation and small addition to what had been said on this 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..

How to add a UIImage in MailComposer Sheet of MFMailComposeViewController

http://stackoverflow.com/questions/1527351/how-to-add-a-uiimage-in-mailcomposer-sheet-of-mfmailcomposeviewcontroller

Create a string with HTML formatting for the email body NSMutableString emailBody NSMutableString alloc initWithString @ html body retain Add some text to it however you want emailBody appendString @ p Some email body text can go here p Pick an image to insert This example would come from the main bundle but your source can..

iPhone and OpenCV

http://stackoverflow.com/questions/348040/iphone-and-opencv

and OpenCV I know that OpenCV was ported to Mac OS X however I did not find any info about a port to the iPhone. I am not a Mac developer so that I do not know whether a Mac OS X port is enough for the iPhone. Does anyone..

Inner shadow effect on UIView layer?

http://stackoverflow.com/questions/4431292/inner-shadow-effect-on-uiview-layer

gradient atIndex 0 I'd like to add an inner shadow effect to it but I am not quite sure how to do this. I suppose I would be required to draw in drawRect however this would add the layer on top of other UIView objects since it's supposed to be a bar behind some buttons so I am at a loss as to what to do I could add another..

OpenGL Texture Coordinates in Pixel Space

http://stackoverflow.com/questions/5879403/opengl-texture-coordinates-in-pixel-space

8 4 8 5 8 6 8 7 8 8 8 The digits denote the texture's pixels the bars the edges of the texture and in case of nearest filtering the border between pixels. You however want to hit the pixels' centers. So you're interested in the texture coordinates 0 8 1 8 2 1 2 8 1 8 2 8 2 3 2 8 ... 7 8 8 8 2 15 2 8 Or more generally for pixel..

Understanding reference counting with Cocoa and Objective-C

http://stackoverflow.com/questions/6578/understanding-reference-counting-with-cocoa-and-objective-c

to return s but we've upped its reference count. The caller shouldn't be responsible for releasing it since we're the ones that created it. If we call release however the reference count will hit zero and bad memory will be returned to the caller. The answer is to call autorelease before returning the string. By explicitly calling..

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

format s you could also add category methods that return singleton instances with certain configurations something like sharedRFC3339DateFormatter . Be aware however that NSDateFormatter is not thread safe and you have to use locks or @synchronized blocks when you're using the same instance from multiple threads. share improve..

Open source CoverFlow library for iPhone [closed]

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

closed Are there any open source CoverFlow like 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..

iPhone Data Usage Tracking/Monitoring

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

i read in apple forum that The OS does not keep network statistics on a process by process basis. As such there's no exact solution to this problem. You can however get network statistics for each network interface. In general en0 is your Wi Fi interface and pdp_ip0 is your WWAN interface. There is no good way to get information..

Animate change of view controllers without using navigation controller stack, subviews or modal controllers?

http://stackoverflow.com/questions/8146253/animate-change-of-view-controllers-without-using-navigation-controller-stack-su

simply implement the same logic directly in your app delegate eliminating the need for the TransitionController class. The logic you'd need would be the same however. Use it as follows In your app delegate add a property for the TransitionController BOOL application UIApplication application didFinishLaunchingWithOptions NSDictionary..

How to target a specific iPhone version?

http://stackoverflow.com/questions/820142/how-to-target-a-specific-iphone-version

to target a specific iPhone version I've got some code I want to only execute on the latest iPhone SDK 3.0 however I can't seem to figure out a way to target just 3.0 and ignore 2.2.1 etc. There is an ifdef statement but it just seems to cover the entire iPhone #if TARGET_OS_IPHONE..

Having trouble adding objects to NSMutableArray in Objective C

http://stackoverflow.com/questions/851926/having-trouble-adding-objects-to-nsmutablearray-in-objective-c

simple. I am trying to add an NSNumber object to an NSMutableArray instance variable. I tried adding NSNumber card to NSMutableArray viewedCardsArray however without breaking it does not get added to the array. Here is the code. Inside the header file Class.h @interface MyViewController UIViewController NSMutableArray..

Reading HTML content from a UIWebView

http://stackoverflow.com/questions/992348/reading-html-content-from-a-uiwebview

error NSString page NSString stringWithContentsOfURL requestURL encoding NSASCIIStringEncoding error &error EDIT Both these methods take a performance hit however since they do the request twice. You can get around this by grabbing the content from a currently loaded UIWebView using its stringByEvaluatingJavascriptFromString.. the web view using loadHTMLString baseURL assuming you also held on to the NSURL you requested yourWebView loadHTMLString page baseURL requestURL I'm not sure however if this will run Javascript found in the page you load the method name loadHTMLString is somewhat ambiguous and the docs don't say much about it . For more info..

How to programmatically send SMS on the iPhone?

http://stackoverflow.com/questions/10848/how-to-programmatically-send-sms-on-the-iphone

iOS limitations prior to using this controller or risk restricting your app to recently upgraded 3G 3GS and 4 iPhones. However an intermediate server that sends SMS will allow any and all of these iOS devices to send SMS as long as they have internet..

Detect the specific iPhone/iPod touch model [duplicate]

http://stackoverflow.com/questions/1108859/detect-the-specific-iphone-ipod-touch-model

game that utilizes the peer to peer bluetooth capabilities of the iPhone and probably the iPod touch 2nd generation . However to stop the users from trying to play a multiplayer on an iPod 1st gen and iPhone 2G I need to check for the specific device..

How to make a UITextField move up when keyboard is present

http://stackoverflow.com/questions/1126726/how-to-make-a-uitextfield-move-up-when-keyboard-is-present

scrollView.frame.origin.y scrollView.frame.size.width scrollView.frame.size.height 215 50 resize However this doesn't automatically move up or center the lower text fields in the visible area which is what I would really like...

UIImagePickerController and extracting EXIF data from existing photos

http://stackoverflow.com/questions/1238838/uiimagepickercontroller-and-extracting-exif-data-from-existing-photos

photos It's well known that UIImagePickerController doesn't return the metadata of the photo after selection. However a couple of apps in the app store Mobile Fotos PixelPipe seem to be able to read the original files and the EXIF data stored.. the original file from the private var mobile Media DCIM 100APPLE folder and running it through an EXIF library. However I can't work out a way of matching a photo returned from the UIImagePickerController to a file on disk. I've explored file.. then use it with the iPhone exif library. UPDATE I gave a test to the library mentioned above and it seems to work. However because of my limited knwoledge about the EXIF format and the lack of high level API in the library I don't manage to get..

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

and instead uses constraints to lay things out. Nothing will be hard coded and your life will become a lot simpler. However if you have to support older iOS's then it really depends on your application. A majority of applications that use a standard..

AES Encryption for an NSString on the iPhone

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

this question Since you haven't posted any code it's difficult to know exactly which problems you're encountering. However the blog post you link to does seem to work pretty decently... aside from the extra comma in each call to CCCrypt which..

How to access SOAP services from iPhone

http://stackoverflow.com/questions/204465/how-to-access-soap-services-from-iphone

SOAP library that depends on libxml2 which is included in the iPhone SDK . I've written my own SOAP framework for OSX. However it is not actively maintained and will require some time to port to the iPhone you'll need to replace NSXML with TouchXML..

iPhone ivar naming convention [duplicate]

http://stackoverflow.com/questions/2114587/iphone-ivar-naming-convention

another responder noted to avoid conflict with incoming parameter names. Even in Apple sample code the use is mixed. However I greatly prefer to not use the _ prefix and have two strong reasons 1 Some people think the _ is a good indicator of private..

EXC_BAD_ACCESS signal received

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

error in the accelerometer code. It would not execute within the simulator which is why it did not throw any errors. However it would execute once deployed to the device. Most of the answers to this question deal with the general EXC_BAD_ACCESS..

Check iPhone iOS Version

http://stackoverflow.com/questions/3339722/check-iphone-ios-version

version ios share improve this question You can get the OS version using UIDevice currentDevice systemVersion However you should avoid relying on the version string as an indication of device or OS capabilities. There is usually a more reliable..

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

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 looking..

Getting current device language in iOS?

http://stackoverflow.com/questions/3910244/getting-current-device-language-in-ios

return the current region of the device not the currently selected language. These are often one and the same. However if I am in North America and I set my language to Japanese my region will still be English United States . In order to retrieve..

“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

is missing a required architecture. At least one of the following architecture s must be present armv6 19033 However in my project I thought I had things set correctly Architectures is Standard armv6 armv7 Base SDK Latest iOS currently set..

iOS SDK - Programmatically generate a PDF file

http://stackoverflow.com/questions/4362734/ios-sdk-programmatically-generate-a-pdf-file

e.g. if you only intend to display the PDF on the iPhone or Mac desktops then you should be fine using CoreGraphics . However if you need to create a PDF that works anywhere then you should take a closer look at this issue. Here's some additional..

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

profiles you have in play. EDIT @cocoanetics pointed out that IPCU is not required to remove the profile. However note that to get your device back to normal you would need to do the following Reboot Open the settings app FIRST don't..

What's the best way to communicate between view controllers?

http://stackoverflow.com/questions/569940/whats-the-best-way-to-communicate-between-view-controllers

pushed onto the UINavigationController stack. That's how the UINavigationController works. That's logical. However there are some stern warnings in the slide about communicating between your UIViewControllers. I'm going to quote from this..

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

of the image the fastest image format to use with the iPhone is PNG because it has optimizations for that format. However if you want to store these images as JPEGs you can take your UIImage and do the following NSData dataForJPEGFile UIImageJPEGRepresentation..

UIDevice uniqueIdentifier Deprecated - What To Do Now?

http://stackoverflow.com/questions/6993325/uidevice-uniqueidentifier-deprecated-what-to-do-now

call the CFUUIDCreate function to create a UUID and write it to the defaults database using the NSUserDefaults class. However this value won't be the same if a user uninstalls and re installs the app. iphone ios ipad share improve this question..

Dispelling the UIImage imageNamed: FUD

http://stackoverflow.com/questions/924740/dispelling-the-uiimage-imagenamed-fud

won nothing here except to have a cached version of the image hanging around and likely for longer than you need it. However if you do have a large image that you need to redraw often then there are alternatives although the one I would recommend..

Is there any ready-made calendar control for iPhone apps?

http://stackoverflow.com/questions/997779/is-there-any-ready-made-calendar-control-for-iphone-apps

a calendar just like the one displayed in the month view in the built in Calendar application would be a best match. However the iPhone Human Interface Guidelines just mentions the Date Picker not the calendar so I believe there is nothing like..

How to programmatically send SMS on the iPhone?

http://stackoverflow.com/questions/10848/how-to-programmatically-send-sms-on-the-iphone

ie your program on the iPhone sends a UDP packet to your server which sends the real SMS iOS 4 Update iOS 4 however now provides a viewcontroller you can import into your application. You prepopulate the SMS fields then the user can initiate..

Setting action for back button in navigation controller

http://stackoverflow.com/questions/1214965/setting-action-for-back-button-in-navigation-controller

backButton As soon as I set it through the leftBarButtonItem on the navigationItem it calls my action however then the button looks like a plain round one instead of the arrowed back one self.navigationItem.leftBarButtonItem backButton..

UIScrollView horizontal paging like Mobile Safari tabs

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

figure out how wide you want your pages to be. Make that the width of the UIScrollView . Then set your subview's sizes however big you need them to be and set their centers based on multiples of the UIScrollView 's width. Then since you want to see.. would be to subclass UIScrollView and override its BOOL pointInside CGPoint point withEvent UIEvent event method however you will still need a container view to do the clipping and it may be difficult to determine when to return YES based only..

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

UIViewAutoresizingFlexibleWidth UIViewAutoresizingFlexibleHeight It works great out of the box for table views however if your app used pixel perfect layout for displaying content then your best bet would be to re imagine the content so that..

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

to what had been said on this 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..

How to add a UIImage in MailComposer Sheet of MFMailComposeViewController

http://stackoverflow.com/questions/1527351/how-to-add-a-uiimage-in-mailcomposer-sheet-of-mfmailcomposeviewcontroller

the email body NSMutableString emailBody NSMutableString alloc initWithString @ html body retain Add some text to it however you want emailBody appendString @ p Some email body text can go here p Pick an image to insert This example would come from..

iPhone and OpenCV

http://stackoverflow.com/questions/348040/iphone-and-opencv

and OpenCV I know that OpenCV was ported to Mac OS X however I did not find any info about a port to the iPhone. I am not a Mac developer so that I do not know whether a Mac OS X port..

Inner shadow effect on UIView layer?

http://stackoverflow.com/questions/4431292/inner-shadow-effect-on-uiview-layer

an inner shadow effect to it but I am not quite sure how to do this. I suppose I would be required to draw in drawRect however this would add the layer on top of other UIView objects since it's supposed to be a bar behind some buttons so I am at a..

OpenGL Texture Coordinates in Pixel Space

http://stackoverflow.com/questions/5879403/opengl-texture-coordinates-in-pixel-space

the texture's pixels the bars the edges of the texture and in case of nearest filtering the border between pixels. You however want to hit the pixels' centers. So you're interested in the texture coordinates 0 8 1 8 2 1 2 8 1 8 2 8 2 3 2 8 ... 7 8..

Understanding reference counting with Cocoa and Objective-C

http://stackoverflow.com/questions/6578/understanding-reference-counting-with-cocoa-and-objective-c

count. The caller shouldn't be responsible for releasing it since we're the ones that created it. If we call release however the reference count will hit zero and bad memory will be returned to the caller. The answer is to call autorelease before..

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

that return singleton instances with certain configurations something like sharedRFC3339DateFormatter . Be aware however that NSDateFormatter is not thread safe and you have to use locks or @synchronized blocks when you're using the same instance..

Open source CoverFlow library for iPhone [closed]

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

like 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..

iPhone Data Usage Tracking/Monitoring

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

not keep network statistics on a process by process basis. As such there's no exact solution to this problem. You can however get network statistics for each network interface. In general en0 is your Wi Fi interface and pdp_ip0 is your WWAN interface...

Animate change of view controllers without using navigation controller stack, subviews or modal controllers?

http://stackoverflow.com/questions/8146253/animate-change-of-view-controllers-without-using-navigation-controller-stack-su

in your app delegate eliminating the need for the TransitionController class. The logic you'd need would be the same however. Use it as follows In your app delegate add a property for the TransitionController BOOL application UIApplication application..

How to target a specific iPhone version?

http://stackoverflow.com/questions/820142/how-to-target-a-specific-iphone-version

to target a specific iPhone version I've got some code I want to only execute on the latest iPhone SDK 3.0 however I can't seem to figure out a way to target just 3.0 and ignore 2.2.1 etc. There is an ifdef statement but it just seems..

Having trouble adding objects to NSMutableArray in Objective C

http://stackoverflow.com/questions/851926/having-trouble-adding-objects-to-nsmutablearray-in-objective-c

object to an NSMutableArray instance variable. I tried adding NSNumber card to NSMutableArray viewedCardsArray however without breaking it does not get added to the array. Here is the code. Inside the header file Class.h @interface MyViewController..

Reading HTML content from a UIWebView

http://stackoverflow.com/questions/992348/reading-html-content-from-a-uiwebview

requestURL encoding NSASCIIStringEncoding error &error EDIT Both these methods take a performance hit however since they do the request twice. You can get around this by grabbing the content from a currently loaded UIWebView using.. assuming you also held on to the NSURL you requested yourWebView loadHTMLString page baseURL requestURL I'm not sure however if this will run Javascript found in the page you load the method name loadHTMLString is somewhat ambiguous and the docs..

iOS get Configuration Profiles that are installed

http://stackoverflow.com/questions/10344814/ios-get-configuration-profiles-that-are-installed

like the bottom left image. The problem is that all over the internet people are saying that this is impossible. HOWEVER Junos Pulse can do this bottom left image . It is only reading the Configuration Profiles which is exactly what I need...

How to save the content in UIWebView for faster loading on next launch?

http://stackoverflow.com/questions/1343515/how-to-save-the-content-in-uiwebview-for-faster-loading-on-next-launch

even if some mechanisms seems to work OK under MacOS X the same approaches may have curious behavior under iPhone. HOWEVER I'm doing it by playing with the global cache that is accessed by any NSURLConnection UIWebView included. And in my case..

Alternative to startMonitoringSignificantLocationChanges?

http://stackoverflow.com/questions/4881975/alternative-to-startmonitoringsignificantlocationchanges

least desirable option. However if you are trying to track someone's walk this is the sort of thing you need to do. HOWEVER . You say you only want to get updates every 10 mins or so. In that case you are best NOT to use this strategy and instead..

Facebook iOS Safari “Cannot Open Page Error” When Authenticating User with Single-Sign-On

http://stackoverflow.com/questions/5131178/facebook-ios-safari-cannot-open-page-error-when-authenticating-user-with-singl

Safari cannot open the request because the address is invalid at the URL http www.facebook.com connect uiserver.php HOWEVER If I have DemoApp installed on my simulator and my own application it will switch BACK to DemoApp with my successfully logged..

Tap pressure strength detection using accelerometer

http://stackoverflow.com/questions/5179426/tap-pressure-strength-detection-using-accelerometer

BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE DATA OR PROFITS OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT INCLUDING NEGLIGENCE OR OTHERWISE ARISING.. BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE DATA OR PROFITS OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT INCLUDING NEGLIGENCE OR OTHERWISE ARISING..

how to obtain the UITableViewCell within heightForRowAtIndexPath?

http://stackoverflow.com/questions/5254723/how-to-obtain-the-uitableviewcell-within-heightforrowatindexpath

the already created labels in each cell to get their heights and add them together for the overall cell row height HOWEVER if they haven't been set up yet within cellForRowAtIndexPath then I guess my approach can't really work iphone ios uitableview..

MFMailComposeViewController doesn't link for simulator

http://stackoverflow.com/questions/5938445/mfmailcomposeviewcontroller-doesnt-link-for-simulator

run it in the simulator I am aware it will not send email I'm just concerned that it builds . That seems to work fine. HOWEVER when I try to build in my application I get the following message. ld warning ignoring file Users lloyd Projects iOS simpleApp..

Using AVAssetReader to read (stream) from a remote asset

http://stackoverflow.com/questions/6242131/using-avassetreader-to-read-stream-from-a-remote-asset

which I'm sometimes able to initialize an AVAssetReader successfully I'll expand on the 'sometimes' as well shortly . HOWEVER copyNextSampleBuffer always returns nil in case of remote MP4's . Since several things UPTO the point of invoking copyNextSampleBuffer..

Storyboard and Switch Views?

http://stackoverflow.com/questions/8319002/storyboard-and-switch-views

@ IDENTIFIER IDENTIFIER is defined in your storyboard it's in the Utilities Attributes Inspector on the right side. HOWEVER your real problem is that you shouldn't be loading from the storyboard at all. you should just be calling self dismissModalViewControllerAnimated..