cocoa-touch

Does pushViewController retain the controller?

I am struggling to find out if pushViewController retains the controller, currently I have the following code (which works) ... ColorController *colorController = [[ColorController alloc] initWithNibName:nibColor bundle:nil]; [[self navigationController] pushViewController:colorController animated:YES]; [colorController release]; but ...

iPad: Custom Toolbar for UISplitViewController

How exactly does one go about implementing a custom toolbar for the main table view section of a split view? The program I am writing for the iPad is landscape only so the split view has a static table view along the left side, and at the top is the toolbar with a title. It is this toolbar I would like to change. I have created the spl...

Pressing on a button causes UIScrollView to scorll

Hi, I'm having an inconsistent problem where sometimes I press on a button inside the scrollview. The scrollview catches the event and scrolls instead of the button getting the touch event. Any idea how to solve this bizarre behavior. Thanks ...

Customizing the appearance of a highlighted UTableViewCell

I have found a number of similar questions on SO but none of them have answered my question. Unlike most of the other questions, I am not using the UITableViewCell's textLabel property but performing my own drawing in its drawRect method. When the cell is highlighted, it turns blue and my custom drawing disappears. I want the cell to ...

Generating Excel file from Cocoa (iPhone app)

Hi, I'd like to offer the possibility for users of my app to export to Excel. I don't ever need to read Excel files. The three ways I know right now is to make a CSV file, which isn't too great as I'd like to have some custom formatting in the spreadsheet make an XML file that I don't think people'd recognize as an Excel file make a ...

How can I make a call inside an iPhone application?

I want the user to make a call from my application Something like this post, but instead of sending an email, make a call http://stackoverflow.com/questions/310946/how-can-i-send-mail-from-an-iphone-application Tanks! ...

Autorelease NSString

Am I responsible for releasing this string, and is it autorelease by default? // command is of type NSData* char cAddress[12]; [command getBytes:cAddress range:NSMakeRange(5,12)]; NSString *someString = [NSString stringWithCharacters:(const unichar*)cAddress length:12]; ...

Image effects using cocoa touch

Hi there. I'm wanting to enlarge/augment certain parts of a photo taken using the iPhone's camera. Does anyone have a suggestion as to how I should go around doing this? I was thinking of applying a filter, if they are available. I was also thinking of cropping parts of the image and then manipulating them. Would be interested to hear...

object position relative to a different subview

I am thinking about creating a Game Board view with an array of subviews to form slots for tiles. I plan to have tiles that I can drop onto the board and have them snap into position. The part I am unclear about is when I drop my tile and the touchesEnded event fires, what is the best way to loop through the subviews of my Game Board to ...

How do I change modalTransitionStyle?

I am currently using this code to bring up an info window -(IBAction)showInfo:(id)sender { InfoView *info = [[InfoView alloc] initWithNibName:nil bundle:[NSBundle mainBundle]]; [self presentModalViewController:info animated:YES]; [info release]; } It currently uses the default transition style, UIModalTransitionStyleCoverVerti...

How do I limit a user to listening to only 3 songs before logging in?

I have the music player application in which I have 90 songs total. I would like for the user to be able to listen to three of these without logging in, then require them to log in to listen to any others. How would you suggest I implement this? ...

how to overlay an image in iphone application?

I want to overlay an image over a button. the button has a background image. If i want to overlay a semi transparent image over the button, suppose i overlay a red color image, which is semi transparent. Can any one suggest how to do that? Suggest some documentation. ...

Problem in writing to a file in application bundle.

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectoryPath = [paths objectAtIndex:0]; fileName = [documentsDirectoryPath stringByAppendingPathComponent:@"user.txt"]; NSFileHandle *myHandle = [NSFileHandle fileHandleForUpdatingAtPath:fileName]; ...

UIImageView does not autoresize properly when ViewController launches in landscape mode

I have a UIViewController (VC) which can be presented in landscape or portrait orientations. The VC contains an imageview whose autoresizingmask is set to: UIViewAutoresizingFlexibleLeftMargin When the VC is launched in portrait mode and subsequently rotated, the imageview moves appropriately. However, when the VC is launched in landsca...

How do I adjust my content views so that they are not obscured by the keyboard?

When the keyboard slides up in my iPhone application, it obscures a large portion of the screen. How do I adjust my views so that they are not hidden under the keyboard? ...

Character count in MFMessageComposeViewController

Is there a way of showing the character count in the MFMessageComposeViewController? I have turned it ON in the iPhone settings for the native sms app but in my app it does not show it. ...

Retaining rootViewController?

I wonder if someone can help me out with regards to the memory management in the code below. I am particularly interested in rootController, does it get retained when I do initWithRootViewController or does it instead (which is my guess) get retained with window addSubView: I am just curious what is happening ... - (BOOL)application:(UI...

Simple http post example in xcode?

Hi, I have a php webpage that requires a login (userid & password). I have the user enter the information into the app just fine.. but I need an example on how to do a POST command to a website. The apple example on the support site is rather complicated showing a picture upload.. mine should be simpler.. I just want to post 2 lines of ...

Is it Possible to play movies in queue using AVPlayer...?

i have to play movies one after another(queue), i try with MPMoviePlayerController by setting content url but flick is there. Is it possible with AVPlayer..? if possible any sample or tutorial Thanks in Advance... ...

scope bar search iPad

I have to specialize a search in my iPad app, and I think to use the scope bar with the search bar. But how can I get the index of a selected scope button and base my search on it? thanks ...