iphone

Is there a way to display a UIBarButtonItem without using a UIToolBar... or even

Or even, is it posible to make the UIToolbar invisible? How can I achieve the effect of showing a standard UIBarButtonItem, without showing a UIToolBar? ...

iPhone Status Bar for custom message ala Evernote, In-Call, etc.

I am trying to find how to implement a custom message on the status bar, something like the Evernote "Downloading changes..." message seen here. Is this a private API call? Any suggestions or pointers? ...

Is there a function that triggers UIImagePickerController to take a photo?

I would like to trigger the camera with a non-standard button. What function do I call to trigger the camera? ...

Detect in Xcode iPhone project whether I'm building for simulator or device?

Is there any way I can conditionally compile in my app based upon whether I'm building for the simulator or the device? (My app hooks to an external server: if I'm running on the device, I want to connect to localhost; if I'm running on the device, I want to go to my production server.) I'm looking for some #ifdef variable I can detect,...

Using libraries in XCode and sharing them via Subversion

We are including the mySettings library in our iPhone application to provide a settings dialog inside the application. The installation description in the Wiki of the projects describes how to include the library (see http://bitbucket.org/karemorstol/mysettings/wiki/Installation). After following these instructions the application compi...

Problem with linking QuarzCore

Hello, I am new with Objective C and iPhone development but that is what I am trying to do... Problem is with QuarzCore and basic animation stuff. These lines are from my applicationDelegate: #import "QuartzCore/QuartzCore.h" ... -(void)performTransition { if(!transitioning) { CATransition *transition = [CATransition anim...

Mixing CAEAGLLayer with other CALayers

I'm trying, unsuccessfully, to combine OpenGL content with other CALayers. In particular, I would like to overlay the OpenGL content above the other layers (with alpha transparency). I run into two problems: My OpenGL rendering is never displayed (even though the OpenGL functions succeeds). The OpenGL rendering is awfully slow (aroun...

Resizing images on iPhone for UITableView image

I'm using a sectioned TableView, and I want to show an image on the left side of the cell. If I pick one from the photo library (out of the example photos in simulator) and set it as UITableViewCell.imageView.image, it takes up the whole screen. How can I resize the image so that it fits exactly into the cell's image view? Thanks, Y...

Controlling Number of Application Executions

Is there a way to control the number of times an iPhone app executes. For example, I have a game called widget and I only want the user to play the game (new instance) no more that 20. Also, if tis is possible, how would you be able to stop the person from deleting then downloading the app again to get another 10 plays? ...

What is initWithCoder?

Please explain to me what is initWithCoder? Thanks. ...

What is the reason behind giving Underscore in private header files of apple

I have seen many .h ( Private API's ) of apple. Most of the variables / structures / enums / classes have _ as prefix. #import <Foundation/NSValue.h> #import <Foundation/NSObjCRuntime.h> @class NSString; typedef struct _NSRange { NSUInteger location; NSUInteger length; } NSRange; My question is, What is reason behind giving...

Write to a File in Monotouch

How would I create and write to a file in a Monotouch iPhone app? The file should persist between application launches, so I guess it has to be placed somewhere in the App bundle ( documents or resources?). ...

how to initialize UITableView? Both from XIB and programmatically?

Hi all, I have a simple request that I have spent much time on (embarrassingly).. I have sub-classed a UITableView to add some functionality. These new features require things like NSMutableSet which require allocation/initialization. I have put my object's initialization routine in - (id)initWithFrame:(CGRect)frame style:(UITableVie...

"Swapping" a UIView Instance variable - cannot dealloc "previous" view

I want to organize somehow my iPhone game's level-views, but I simply cannot (without expanding Object Allocations). I made a really "skeleton" of my code (this game has 2 levels, the goal is to release the iPhone display). I just cannot dealloc the previous level, so Instrunments shows incrementing BGTangramLevel instances. Please, tak...

String & variable Help needed - iphone sdk

Hey guys, I have this quick problem I need to solve. I have a string here like so: textbox.text =@"Your name is" then I want to add right after "your name is" a variable that displays text. so in Visual Basic I learned it like this... textbox.text =@"Your name is" & variable1. but now i can see that it doesn't work like that in c...

iPhone Core Data "Automatic Lightweight Migration"

I am attempting to update an app that implements a core data store. I am adding an attribute to one of the entities. I added the following code to my delegate class: - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { if (persistentStoreCoordinator != nil) { return persistentStoreCoordinator; } NSURL ...

how to select multiple photos from photoalbum by programming

hello everyone, I want to select multiple photos from photoalum each time by programming, could you tell me how to do . thank you very much. best regards, ofllm ...

How to animate a UISearchBar sliding in and out of the view without a UISearchDisplayController?

I have a view that has a button which toggles a UISearchBar using searchBar.hidden = !searchBar.hidden; The searchbar goes out and queries a web service to get results and then displays them to the user without ever using a UITableView or a local datasource or anything. As such I don't really want to use a UISearchDisplayController to...

Detecting end of programmatic UIScrollView scroll

I'm doing programmatic scrolling in UITableViews with scrollToRowAtIndexPath, which does not trigger scrollViewDidEndDecelerating. What is a good way to detect when this scrolling has completed? I ask because in my code: [tableView1 scrollToRowAtIndexPath:indexPath1 atScrollPosition:UITableViewScrollPositionBottom animated:YES]; [tabl...

iPhone, rotated + EAGLView, rotated =

...frustration. I want my game to be run only in landscape mode. I have added the appropriate key/value to the Info.plist file that forces the device orientation to be correct at launch. I'm now trying to rotate the OpenGL coordinate space to match that of the device. I'm trying to use the code I found here, but it's not working. My...