ios

Is NSMainNibFile a required setting?

If I plan to programmatically create my views, can I build an iOS application without a main nib file? If so, how do I tell UIApplication what my app delegate is? ...

How can i create Custom Style for styleBar of UINavigationBar?

Can i creates my custom style for styleBar of UINavigationBar? ...

how to refresh an oauth token when using the Facebook iPhone SDK

I'm using the Facebook SDK for iOS in my app: http://github.com/facebook/facebook-ios-sdk The oAuth token expires after about 2 hours. How can I "refresh" the oAuth token without having to call the [Facebook authorize...] method again - which shows an empty Facebook dialog briefly if the user had previously logged in? What I want ...

Best way to allow text edit completion on a complex iPhone UI

I have a somewhat complex iOS view hierarchy. One piece of text is an editable UITextField. When the user touches it, it becomes first responder, and is editable. Here's the rub, though: Best practice should be that a touch anywhere outside the edit control causes it to resign first responder and end editing. What's the best way of acco...

Lauching App with URL (via UIApplicationDelegate's handleOpenURL) working under iOS 4, but not under iOS 3.2

I have implemented UIApplicationDelegate's application:didFinishLaunchingWithOptions: and application:handleOpenURL: according to specification, i.e., application:didFinishLaunchingWithOptions: returns YES and application:handleOpenURL: opens the URL. The code works under iOS 4 (in both cases, i.e., when the app is launched and ...

display the content of MS Office 2007/2010 files on iPad

Hi all, how can we display the content of MS Office 2007/2010 files (specially .docx) in iOS 3.2 (ipad) ? thanks in advance. ...

Why is there a background on a table cell's text, but only on the iPad?

I'm trying to set the background color on a cell. It works fine in iOS 4 on a 3GS and in the sim, but when I test in 3.2 I get a background on the text label that I can't get rid of. I've tried to set the opacity and background of the label, detail label, content view, and accessory views manually and had no success. I even resorted...

UIDocumentInteractionController not working in iPad Simulator (XCode 3.2.3)

The UIDocumentInteractionController appears to be non-functional in iPad Simulator ("iPhone Simulator" version 4.0, shipping with XCode 3.2.3, using iOS Version 3.2). I have a simple sample code presenting a PDF preview using UIDocumentInteractionController. It works on the device. On iPad presentPreview just returns NO, the UIDocument...

Why isn't the NSNumber class correctly converting my NSString object to a long long?

Hello. I'm trying to convert an NSString object to an NSNumber with the same numerical value. When I create the NSString object using this statement... NSString *songID = [localNotif.userInfo objectForKey:@"SongID"]; the var songID contains the string value @"10359537395704663785". and when I attempt to convert it to an NSNumber ob...

Why isn't my modal view being displayed in my iOS app?

Hello. I have a tabbar-based iOS app with two tabs. When I tab into the second view, I want it to immediately present a modal view to the user. Here's my simple code for this... - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; MyViewController_iPhone *myVC = [[MyViewController_iPhone alloc] initWithNibName:@"...

Maximum CAShapeLayer size?

I'm trying to draw a semi-transparent shape over an image. I've got a UIView which has it's layer's contents set to the image, with a CAShapeLayer sub-layer who's path is set to the shape. There are a few of these UIViews inside a parent UIView, which is the zoom child of a UIScrollView. Everything is fine on the iPhone, but when I zoo...

Why doesn't my UIView remain transparent after it finishes loading?

Hello. I have a view being displayed modally and, before I display it, I set it's background color to transparent... - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; MyViewController_iPhone *myVC = [[MyViewController_iPhone alloc] initWithNibName:@"MyView" bundle:nil]; [myVC.view setBackgroundColor:[UIColor co...

Understanding (symbolized) iOS crash log

Hi, This is a continuation to my previous attempt to resolve a pesky issue affecting a few instances of my app. The problem happens on a few iPads only, but as you know, these are the ones who take their time to leave a nice, thoughtful review :-/ Anywho, I finally got the crash log symbolized properly, and it is pointing to: Nonograms...

Are modal view controllers the preferred way to replace the entire interface on an iPad?

Specifically, I have something like a game, with a menu screen made out of standard components. I want a button to switch to another view controller that the user will interact with for a while, then return to the menu screen. It seems like having the menu controller present the 'game' mode as a modal view controller is the most straight...

Is Apple's current Reachability class backwards-compatible with iOS 3.1?

I'm implementing Apple's Reachibility class into my application. The app's base SDK is iOS 4.0, and its deployment target is iOS 3.1. I do not have a 3.1 device to test with, so can anyone tell me if it is backwards compatible? The documents for Reachability say that iOS 4.0 is required, so if it does indeed need a minimum of 4.0, how c...

iphone add local access

if I download a html from my web server can i use an image in my iphone app's resource folder as background? ...

Is there a collection of consistent and nice document icons (e.g. HTML, ZIP, PDF)?

I am looking for a collection of consistent, nice looking, system neutral document icons. For example, if you check the entry of PDF file format or the ZIP file format in wikipedia you find at right side a document icon for the respective file. However, these icons are neither free nor have a consistent design. Systems like OS X, Windows...

Is there a thread safe way to create PNG images in pre-4.0 iOS?

I'm pretty sure that UIImagePNGRepresentation([UIImage imageWithCGImage:imageRef]) is the cause of random-looking memory leaks when done in a background thread (it causes leaks that trace back to CGContextDrawPDFPage!). Now, everywhere else on the internet says I should use CGImageDestination, which isn't available until iOS4. Is the...

Building app for iPhone and iPad.

Can any one suggest how I can build Universal app for iPad as well iPhone. What all things I should take care of ? How to take care of resource images used ? Is it possible to have same code base should work for iPad as well iPhone. ...

NSMutableURLRequest setHTTPBody: crash.

Hello. I'm trying to send some data to a PHP script online to submit online scores for my iOS application. The script will require account credentials formatted with the proper escape characters for a HTTP request. It's the setHTTPBody method which cashes the application: [text_field removeFromSuperview]; text_field.tex...