ios

Crash when manipulating a simple Core Data object

Hello. I'm diving into iOS development and I have a few questions about manipulating a simple Core Data object that I created in Xcode. After using the object editor, here's the class that Xcode generated for me... @interface Alarm : NSManagedObject { } @property (nonatomic, retain) NSNumber * Enabled; @property (nonatomic, retain...

How do I prioritize performSelectorOnMainThread against NSConnection messages?

I have a lot of NSURLConnections downloading. They may not happen on the main thread. When some of them finish, I call performSelectorOnMainThread for a separate singleton object. I've used both forms of performSelectorOnMainThread, specifying the run loop mode (NSDefaultRunLoopMode) and not specifying it. NSDefaultRunLoopMode is sup...

Can I access the URLs of all open websites on iPhone's mobile Safari?

I am thinking about creating an iPhone App and I wonder if it is possible for an app to access the URLs websites, which are opened in mobile Safari? ...

How to build JavaScriptCore for iOS device?

I've downloaded Webkit nightly build. I open JavaScriptCore and built it. Compilation done without any error. But the output was a Framework contains only OS X binary. I tried unchecking 'build active architecture only' but only desktop architectures built. (I looked in the binary with lipo tool) Is there any simple way to do this? I'm ...

getting the name of the application

Hi, I have a lite and a full version and want them to work with different configuration Files. Now I need to query, within the application, if the application name has "lite" in it and load the coresponding config-file I havent found how to do it. Any Idea ? Or is there generally a better approach for that ? Thanks in advance Heiko ...

UIWebView invert colors

How can I force UIWebView (or UIView) to invert(inverse) colors like film negative? I've try to subclass CALayer and override UIWebView layerClass, but have no successes with catch the drawInContext methods. Any ideas? ...

How can I convert a NSString representation of a time value into two NSInteger's containing the hour and minute?

Hello. I'm diving into iOS development and the Objective C language and am building an alarm clock app to become familiar with the SDK and language. I have an NSString object that represents a time, with the range "1:00 am" to "12:59 am". I need to convert this NSString into two NSInteger's that contain the hour value and minute value...

Playback decompressed G.711 mu-law audio on iPhone

What is the best way to playback decompressed G.711 mu-law audio in iOS? Thanks, Rob ...

Is there a book for Objective-C like "Effective C++" for C++?

In C++ community, "Effective C++" is very famous for its concise, in-depth and practical style. For Objective-C, most of the books in the market is primer introduction to the language. Is there a book for Objective-C like "Effective C++" for C++? BTW, I found this document is very valuable for a programmer from C++ to Objective-C: http:...

How can I prevent the display on an iOS device from dimming and turning off?

Hello. I'm diving into iOS development and am building my own alarm clock app to become familiar with platform and SDK. I've noticed some alarm clock apps in the app store keep the screen from dimming and/or turning off when their app is running. How is this implemented? Thanks so much in advance for all your help! ...

Defining regions in an image

Hello, Being a complete noob in iPhone development, I was wondering what would be the best way to define regions in an Image (for interaction ). So far I've got 2 ideas : use CGpath to basically draw the areas that I`m interested in but I quickly can see it becoming tedious on complex graphics . use a Color coded layer with regions co...

How to get (extract) icon for iOS system app, like address book app?

I want to sync my iPad app with AddressBook system app, so i want to use that icon in UI, which will enable sync process. ...

How can I implement Apple's "Snooze" functionality in their Clock app?

Hello. I'm diving into iOS development and am building my own alarm clock app to become familiar with the platform and SDK. One of the API's I'm currently learning is the Local Notifications API, which I assume is the same API Apple uses to implement their alarms in their Clock app. What I don't understand is how they implement thei...

How to display red "Cancel" button in UITableViewCell?

I am building a custom UITableViewCell which will be displayed while the user is downloading data from a web service, and which will include a "Cancel" button to allow them to cancel the URL connection. I'd like to emulate the look-and-feel of the "Delete" buttons which are displayed in the table editing view, like this: How can I cre...

What's a good way to manage the Local Notifications your app has scheduled?

Hello. I'm diving into iOS development and have been working on an alarm clock app to become familiar with iOS platform and SDK. I'm using Local Notifications to handle my alarms, but I need some method of managing the Local Notifications I set so that they can be updated if I edit or remove any of the alarms associated with them. I f...

Sound Not Playing In iOS - Not A Source Code Problem...

Hello. I want to play a sound in my application. Nothing special, just a little WAV file. The file exists in the device in my main bundle, and I've got both the AVFoundation and AudioToolbox frameworks added. I have alternately tried using both of them, testing out every bit of sample code on the net for playing this sound. It won't wor...

How to get asian fonts working on an iPad?

I have a PDF file with a font reference to STSong-Light which is not available on the iOS. Therefor I can not display the correct characters defined with that font. I took the STSong font file mentioned on Apples KB: http://support.apple.com/kb/ht1538 … and put it into my project and added it to the plist. The text is now no longer b...

UIAlertView with two buttons in iPhone

Hi, I'm trying show an alert view when a button was pressed, so I wrote code as follows: - (IBAction)signUpComplete: (id)sender { UIAlertView* alert_view = [[UIAlertView alloc] initWithTitle: @"test" message: @"test" delegate: nil cancelButtonTitle: @"cancel" otherButtonTitles: @"OK"]; [alert_view show]; [alert_view release...

RegexKitLite issue

Hi folks, I installed RegexKitLite and everything functioning well, except there are many "analyzer results" about potential leaks when compiling the app. These warning are from the RegexKitLite.m Do I missing something during the installation? thanks ...

Where can I download an earlier version of iOS for backwards compatibility testing?

Does anyone know where I can download iOS version 3.1.3? I've been searching on developer.apple.com but haven't been able to find anything. I know that it is possible to install earlier versions of iOS using organiser (I believe the file extension for the iOS images is ipsw) ...