cocoa-touch

Keeping a UISegmentedControl (among others) responsive

I have a segmented control being used as a toggle. When toggled, I switch a bunch of contents around in a table view which takes a tiny but noticeable amount of time (inserting/deleting sections in the table view, animating the change, etc). I want the segmented control to respond to the selection immediately. So in my action handlin...

NSZombies are eating my app's brain!

I've got a retain/release problem. My View is pretty complicated so I've set NSZombieEnabled to YES and am trying to locate which, exactly, object is causing me grief. To speed this process along I'm wondering if there hints or tricks to tracking the Zombies back to the grave they dug their way out of (sorry, had to) or, back to the obje...

Access iPod music folder

Hi, Is it possible on the iPhone to access ipod folder in order to play in my app music that user chooses? Thanks. ...

possible to release viewcontroller.view without releasing viewcontroller?

I have a viewcontroller which can't be released since it is a subclass with extra functionality... Anyway there are many of them, and I need the views to be released when they go offscreen. removeFromSuperView vanishes the views but they remain in memory. The only way I can get rid of the view from memory is to completely dealloc it. ...

Styling the cancel button in a UISearchBar

I have a UISearchBar that has a cancel button (it's displayed using -(void)setShowsCancelButton:animated). I've changed the tintColor of the search bar like this in an attempt to get a grayish searchbar: UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 320, 40)]; searchBar.tintColor = [UIColor colorWithWhite:...

Default height for section header in UITableView

I want to set the height of the first header in my UITableView. For the other headers I want them to remain the default height. What value/constant can I put in place of "someDefaultHeight" in the code below? - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { if (section == 0) return kFi...

UITableView doing strange unplanned animation when added to view hierarchy

Hi, I'm currently trying to add a table view to my view hierarchy and am experiencing strange behaviour. The TableView seems to animate from a CGRectZero to its frame, visually seeming to spill onto the page. I am initializing with a frame of {{0,0},{320,367}}, which I have confirmed by Logging out to the console. This could be a nice e...

Best way to communicate iphone with mac?

I have some apps in mind to control things in my Mac from the iPhone. Probably the simplest thing to do would be to make the iPhone simulate a keyboard and then handle key events on the mac. What do you think it's the best way to communicate iphone with the mac? Can I use GameKit for that? HTTP? ...

Arrange UILabels along circle

I have several UILabels which I would like to arrange in a half-circle, i.e. the left-most would be rotated 90deg counterclockwise, the middle one moved up and is not rotated, the right-most is rotated 90 clockwise. Any ideas on the best practise to achieve this? Or is better to draw the text in the view and forget about UILabels? ...

Is there any in built calendar view in iPhone sdk.

Hello, I want to invoke a calendar as the calendar application does in iPhone. Is there any inbuilt framework which will help or we have to built the whole calendar on our own. ...

Save additional information to a plist every time I run the app? (iphone)

My iphone app writes key-value pairs to a dictionary in a plist file. I'm basically saving the user's score when they play the game. This is all fine and dandy, but each time I run the app and get new scores, the new values get saved over the old values. How do I add information to the plist each time the user accesses the app instea...

How to simplify in app Application Settings management?

I'm sure every cocoa-touch programmer had to face this: I know Apple would like every application to place their settings in the Settings app. But it's quite limiting in what it offers, in terms of customization. Also, it's better to place some settings within the app, as they change frequently. In such cases, the developer has to implem...

TAR encode/decode library for iPhone (ideally cocoa)

Does anyone know of any library/code that will enable me to encode and decode .tar formatted data - that I can use in my iPhone project (preferably cocoa) Thanks in advance Craig UPDATE: I've taken a look at the suggested libraries and come to the conclusion that they are making waaaay to much of the problem - so I'm developing the co...

Returning an array in cocoa, but waiting for delegation to complete

I have created the following method in cocoa: -(NSArray *)latestData { NSURL *requestingURL = [NSURL URLWithString:@"someRestfulURL"]; NSMutableURLRequest *theRequest =[NSMutableURLRequest requestWithURL:requestingURL]; [theRequest setHTTPMethod:@"GET"]; NSURLConnection *theConnection = [NSURLConnection connectionWithR...

iPhone SDK 3.0 and symbolicatecrash not getting along?

* UPDATE * I've reinstalled with Snow Leopard, clean install. Completely wiped my existing Leopard install. Same problem persists. I've tried numbers of versions of symbolicatecrash to resolve symbols in my crash reports. From the version provided by Apple, to Alan's Quatermain's version posted on GitHub and finally from http://openrada...

How does hiding a UIStatusBar apply to UIViews being shown?

I have a mostly-navigation-bar-driven application. A few cases require the presentation of a modal view, and one of those cases requires the hiding of the status bar. However, even if I hide the status bar before presenting the modal view, the view is offset by 20 pixels. Even if I set the frame of the modal view to 0,-20,320,480 afte...

How can i create a uiview that looks like the view in mail.app

I need to create a uiview that looks like the one to display mails in the mail.app on iphone. It looks, that the view is something like a UIWebView, but there is a header-view to display From, To and Subject. This header is non-zoomable and scrolls only by the y-axis. Is there a way to create such a header-view in the UIWebView... // ...

Quartz caching CGLayer

To quote from the CGLayer doc: Quartz caches any objects that are reused, including CGLayer objects. I am having problems with memory on large pages and am trying to implement a simple mechanism where views are released and recreated based on whether they are on/off screen. Say for the sake of simplicity that I have a bunch of UI...

Presenting a modal view controller only after another one has been dismissed

I can't just do [myViewController dismissModalViewControllerAnimated:YES]; [myViewController presentModalViewController:nextModalViewController animated:YES]; one after the other, because then the two animation blocks try to affect the same references simultaneously and things break badly. So what I need to do is make the latter call...

Error while creating an nsarray from plist?

I am trying to create an NSArray from a .plist file, but I keep getting this error: "'NSUnknownKeyException', reason: '[<NSCFString 0x5bbca60> valueForUndefinedKey:]: this class is not key value coding-compliant for the key Value1.'" In the .plist file, I have a key called "Item 1" and a string value called "Value1." Then in the code...