cocoa-touch

How to Add Core Data to an existing Utility Application

Hi, I´ve created an utility Application which is nearly complete, but now I´m on a point were I really have to persist Data. Since XCode provides only Core Data Templates in an Navigation or Window Based App, is there an easy way to add Core Data to my Application? I´ve never worked with Core Data and just have to persist messages with ...

Views load slowly when switching between views on 3G iPhones - how to change my style?

In my iPhone app, views will often load slowly when transitioning, like if a user clicks a button on the Tab Bar Controller. This happens more if the phone is low on memory. It doesn't really come up on 3GS phones, but it's a big problem on 3G phones. I suspect that I'm not following some best practices for creating UIViewControllers. I...

How is iPhone Contact app's detail View implemented

I would like to implement a view similar to the detail view of Apple's own Contacts app where it displays the name, phone number, note, etc. and its Edit mode. Can you dissect how the whole view is done? Is that view done with a UITableView or a UIScrollView? ...

How do you make a UITextView that supports URL links and can be edited?

I have a UITextView that is properly displaying URLs thusly: contentView.editable = NO; contentView.dataDetectorTypes = UIDataDetectorTypeAll; My goal is to make it so you can still tap on this text view in order to edit its text at a particular location (just like the built-in Notes app). That way, if you tap a link, it'll launch a ...

iPhone Sounds and delay

Hello, I am developing an application where the user can tap multiple hit areas which produces sounds. But the result is a little laggy, when multiple sounds start at the same time, the sounds are played with an ugly delay. I am using AVAudioPlayer instances for each sound. Is there a better way to play sounds and prevent this lag? He...

UIWebView error codes

Now I'm developing UIWebView based iPhone app. It is important to be sure that all requests are executing properly. To handle possible errors I'n using webView:didFailLoadWithError: message from UIWebViewDelegate protocol. Where I can find the list of the error codes this control may return? ...

Showing a landscape UIViewController in a portrait UITabBarController/UINavigationController

I understand that this question (or variations of it) has been asked quite a few times, however it's still how to best approach this problem without delving into kludgy hacks. I have an application with the following layout: UITabBarController ↳ UINavigationController ↳ PortraitViewController ↳ LandscapeViewController...

iPhone Memory Leaks in Apple's Code

I'm running leaks through Instruments on my iPhone app and I'm seeing a lot of leaks that don't appear to be coming from my code. For example: NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:operation]; operation.urlConnection = conn...

Implement custom zooming for a UIScrollView

Hi, I have a UIScrollView with the requirement that, when zooming, the contentSize.height should remain the same. Zooming in from 200x100 should result in a new contentSize of 400x100 instead of 400x200, for instance. I'd like to do my own drawing while the user is zooming. I don't think I can use the normal zooming behaviour of UIScro...

webservice JSON in different from SOAP ,XML-RPC,REST ?

which one best for iphone application ? JSON is different from these three webservice methods ? could you please suggest me.. ...

Changing the userAgent of NSURLConnection

Hey I am using a NSURL Connection to receive data. [NSURLConnection sendSynchronousRequest: //create request from url [NSURLRequest requestWithURL: //create url from string [NSURL URLWithString:url] ] //request parameters returningResponse:nil error:nil ] Is it possible to change the user agent string? right now it is: AppName/...

Why should I release (and therefore dealloc) objects just before application quit?

There are plenty of objects in each iPhone app witch will live forever till app dies. They are: application delegate, window, main view controller, may be navigation or tab controller, all the objects within them. Why on Earth should I release them just before quit spending precious CPU cycles? As far as I understand, apps process will b...

Cocoa-Touch: UIPickerView viewForRow crashing

I have a UIPickerView, in it's delegate I'm trying to customize the view for a row. I'm using the 3.1 SDK. So in the delegate I have: - (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view { // view.backgroundColor = [UIColor redColor]; return view...

iPhone game programming: Framework for this game?

For something like this app http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=323242790&mt=8, what sort of game framework is needed? It's all 2D and I've read how popular Cocos is. The problem is I'm not a game programmer and there aren't any good Cocos tutorials out there. Would Cocos be able to create a game like...

Pressing UINavigationController back button while typing.

I recently discovered that if a UITextField is being edited in a controller that's attached to a UINavigationController and the back button is pressed, upon returning to this controller, the DidBeginEditing function is called again and the UITextField keyboard is brought back up. I was wondering if there's a way to stop the keyboard from...

How can i know which button is clicked? Objective C

I am doing Presence1 in Assignment which require me builds a multiple screens application. I have two ViewController, vc1 and vc2. In vc1, i have two buttons. I use a same method for them and the title of them are same. My question is How can i know which button is clicked in vc1 when i change to vc2? There are a topic show me that I ...

iPhone UI controls for WinForms

Does anybody know where I could find WinForms controls that mimic those on the iPhone? I am interested in doing some iPhone prototyping using Visual Studio and it would be handy if I could make the controls look like the native iPhone controls. I know that I could just use Interface Builder on a Mac, but I do not want to do this. I just...

Can the size of a stretchable button image be animated in Cocoa Touch?

I'm creating a UIButton with a stretchableImageWithLeftCapWidth:topCapHeight: I would like to change it's size smoothly with Core Animation like so: float shrinkFactor = 0.2; NSTimeInterval slowSpeed = 5.0; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:slowSpeed]; UIButton *thisButton = (UIButton *)[self.view...

How to add a label in a settings screen

As a picture says more than a thousand words: Any help on how to add descriptive labels to a settings pane would be highly appreciated! I should point out that I want to do this to be in the iPhone-App settings that are in the Settings menu of the iPhone (outside the App). Example label: iPhone -> Settings -> Safari -> Fraud Warning...

iPhone Telephone App -> Recents -> All/Missed Animation

iPhone Telephone App -> Recents -> All/Missed Animation How can I implement that cell adding/removing animation in my own UITableView? I tried the following: [tableController.aTable beginUpdates]; [tableController.aTable deleteSections:self.sectionIndexes withRowAnimation:UITableViewRowAnimationFade]; [tableController.aTable deleteRowsA...