Search Results

Search found 3 results on 1 pages for 'mattmccomb'.

Page 1/1 | 1 

  • Passing NSArray Pointer Rather Than A Pointer To a Specific Type

    - by mattmccomb
    I've just written a piece of code to display a UIActionSheet within my app. Whilst looking at the code to initialise my UIActionSheet something struck me as a little strange. The initialisation function has the following signature... initWithTitle:(NSString *)title delegate:(id UIActionSheetDelegate)delegate cancelButtonTitle:(NSString *)cancelButtonTitle destructiveButtonTitle:(NSString *)destructiveButtonTitle otherButtonTitles:(NSString *)otherButtonTitles As you can see the otherButtonTitles parameter is a pointer to a String. In my code I set it as follows... otherButtonTitles: @"Title", @"Date", nil Although this compiles fine I don't really understand how it works. My reading of the statement is that I have created an inline array containing two elements (Title and Date). How come this then compiles? I'm passing a NSArray* in place of a NSString*. I know from a little of understanding of C++ that an array is really a pointer to the first element. So is this inline array that I'm creating a C array as opposed to a NSArray? What I'm hoping to achieve is to be able to pass a static NSArray* used elsewhere in my class to the otherButtonTitles parameter. But passing the NSArray* object directly doesn't work.

    Read the article

  • Deploying App With Dummy/Initial Data

    - by mattmccomb
    I have a Core Data based application that stores hierarchal data displayed using a series of UITableViews. To illustrate my app functionality to the user I would like to pre-populate my database/app with some dummy values. This data would be available upon installation on the user's iPhone/iPod Touch. What is the best way to achieve this?

    Read the article

  • iTunes Connect: Excluding iPad From Supported Devices

    - by mattmccomb
    I have just uploaded my first app to iTunes Connect and noticed that my list of supported devices is appearing as follows... Device Requirements : Compatible with iPhone, iPod touch, and iPad. I've developed specifically for the iPhone and iPod Touch and have not yet done any testing on the iPad simulator. I therefore don't want the app submission testers to try running my app on an iPad and rejecting it because of some minor issue. I've looked at setting the required device capabilities in my info.plist, but that doesn't appear to allow me to restrict at a device level. Is this a by-product of building using the 3.1.3 SDK? Are apps built using this SDK automatically upscaled to work on the iPad?

    Read the article

1