cocoa-touch

editButtonItem set but no minus buttons?

My edit button is placed in viewDidLoad: self.navigationItem.rightBarButtonItem = self.editButtonItem; It shows up correctly on the nav bar, and tapping this button indeed change it to Done. However, no minus buttons show up in my table rows. Swiping a row, then tap Delete works, though. Any ideas? EDIT 1: Here's how I'm doing: - (...

iphone: resizing the view when the device is rotated

I am trying to develop an application which is geo-sensetive. So, I have written - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations // return (interfaceOrientation == UIInterfaceOrientationPortrait); return YES; } I have put different imag...

Will -replaceObjectAtIndex:withObject: of NSMutableArray release the old object that's replaced by a new one?

The documentation doesn't say anything about that. When an old object is "removed" and a new one comes into it's place, then what happens with the old one? Do I have to release it by myself? ...

How can I disable Instruments to automatically launch when I Build&Go to my device?

I've used instruments for searching for memory leaks. I did that through XCode Run > Start with performance tool > Leaks. Then I quit Instruments. And every time I Build&Go, Instruments automatically launches. Although that's cool, when just wanting to test the app, it's not needed. How can I turn that off? ...

Bad performance with core animation and view rotations: How to improve?

I have 12 views which I rotate almost similar to the icons in the home screen when going into homescreen-customization-mode by touching an icon for a few seconds. I use a 3D transformation code to do the rotations. They have each a duration of just 0.02 seconds, and the angle and direction of rotation changes permanently upon accelerati...

What's the equivalent for setting an "identity transform" in 2D space?

For 3D space, I use: self.layer.transform = CATransform3DIdentity; what corresponds here if I just need 2d space and want to assign the identity transform? I knew there was something, but I can't find it anymore. ...

Adding a subview into view hierarchy

I'd like to have a view appear when the user clicks a button. The hierarchy I have looks like this: MainWindow -UIView --ScrollView ---ScrollView.pages = UIViews ----UIView (from above assignment) ----TextView ----InfoButton pages is an NSMutableArry of pageController objects. These hook to a nib. These nibs are the pages that use...

How do I detect a touch in the iPhone status bar?

I have a UITableview that I would like to scroll to the top when the status bar is touched. I expected to find a notification that I could listen to and then use tableview:scrollToRowAtIndexPath: for the scroll, but can find none. Is there a way to do this? [Update] Finding some more on the net, I am suspicious that this is the simu...

Is there a high-level gestures library for iPhone development?

The iPhone platform has a number of common gesture idioms. For example, there are taps, pinches, and swipes, each with varying number of fingers. But when you're developing an app, it's up to you to implement these things based on low-level information about the number and locations of touches. It seems like this is a prime candidate ...

Is there an way of implementing an minimum deceleration speed in an UIScrollView?

I have an UIScrollView that contains some UIImageViews which are animated. It really only looks cool if there's a minimum scrolling speed happening. But when the user slowly scrolls and lifts the finger, the UIScrollView decelerates very slowly. The problem is, that the scrollViewDidScroll method doesn't get called upon every offset cha...

Developing for both iPhone os 2.2.1 and iPhone os 3.0

Hi, I am, as an enrolled developer into iPhone developer program, received a message from apple, requesting to make all applications to be compatible with iPhone os 3.0. It was said that they won't process applications that are incompatible with iPhone os 3.0 The issue is that if I change the code to work with iPhone os 3.0 it won't wo...

"Changing the delegate of a tab bar" exception

Hi, I have an application that perfectly works on iPhone os 2.2.1 but when I try to run it on iPhone os 3.0 it crushes. Here is the error I got from the console: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Changing the delegate of a tab bar managed by a tab bar controller is not allowed.' Pr...

Objective-C asynchronous callback from

Hi all, I'm trying to make a class that handles some NSURLConnection and authentication stuff and then makes a callback to downloadFinished when it has completed the didReceiveData event. How exactly does that work in Objective-C? Thanks! #import "fetch.h" ... - (IBAction)downloadButton { fetch *downloader = [[fetch alloc] in...

multiline uibutton

how to set a multiline as title of a UIButton in iPhone programming pls help me .. thanks and regards .. ...

Why do I have to call super -dealloc last, and not first?

correct example: - (void)dealloc { [viewController release]; [window release]; [super dealloc]; } wrong example: - (void)dealloc { [super dealloc]; [viewController release]; [window release]; } Althoug in alsmost all other cases when overriding a method I would first call the super's method implementation, i...

How can I make an view-based application that does not use a nib file?

I've choosen the "view-based" application template in Xcode. The myProjectViewController.m has the following code: /* // Implement loadView to create a view hierarchy programmatically, without using a nib. - (void)loadView { } */ That sounds good. But: The template generated a myProjectViewController.xib file. What I dont get is: How ...

How to recognize if app was reloaded after phone call?

I have a program which automatically launches a phone call when program is started. This is implemented in AppDelegate's "applicationDidFinishLaunching"-method. Problem is: When phone call ends and my app automatically launches again, it restarts that loop and phone call is started again. How to recognize if app was returned from that ...

How can I nest a UIScrollView inside a UIScrollView, so that the user can scroll the inner UIScrollView?

I haven't tried that yet, but I assume that I would have to disable scrolling of the parent scroll view as soon as I know that the user will want to scroll in the child scroll view, right? Both scroll views are scrolling horizontal. How could I disable scrolling detection of the parent temporarily? Or is there some other way? ...

Creating iPhone Pop-up Menu Similar to Mail App Menu

I'd like to create a pop-up menu similar to the one found in the mail app when you want to reply to a message. I've seen this in more than one application so I wasn't sure if there was something built into the framework for it or some example code out there. ...

Efficiency of create views programmatically vs IB

I have a large number of UIViews that are created in the app delegate applicationDidFinishLaunching and added to an NSMutableArray. The user pages through these views using a page control and scroll view. I created the UIView and its child components in IB. They are wired to a controller. To create 170 views on the iPhone takes about...