iphone

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...

Events for custom UIView

What's the best way for registering events for my UIView subclass, so that I can connect them to IBAction-s in interface builder? Currently I've just got a standard UIView dropped onto my main view and I've set the class to "RadioDial" (my custom class). This displays the view fine, but I have no idea how to get events out of it. Thank...

Drawing Unicode characters on iPhone

Why is it so hard to figure out how to draw Unicode characters on the iPhone, deriving simple font metrics along the way, such as how wide each imaged glyph is going to be in the font of choice? It looks like it'd be easy with NSLayoutManager, but that API apparently isn't available on the phone. It appears the way people are doing this...

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. ...

onFocus method for the textField

I want to change the cursor position from one textField to another textField. I want set that programatically. How I do that? Is there any method for that in iPhone? ...

Editable TextView with Second NavBar - Text appears, but too late.

Editable TextView with Second NavBar - Text appears, but too late. The app has a single Navigation Controller. I have an iPhone App that has basically three levels. Level 1 - Table with category Names Level 2 - Table with list of items for selected category Level 3 - Tabbed View with several views, including UITextView for details of i...

How can I remove the -mthumb compiler flag in XCode?

I've been reading that by default there is an -mthumb compiler flag which reduces code size by 35%. However, in a floating-point calculation intensive app like mine, this is not an good option, like apple says. I'd like to try it out if it changes anything. ...

presentModalViewController:animated: crash after dismiss (memory mgmt related?)

I'm currently having an issue with UIViewController's presentModalViewController:animated:. I use the following code to set up and show the modal view controller: UINavigationController *navigationController = [[UINavigationController alloc] init]; AddSerialController *serialController = [[AddSerialController alloc] initWithNibName:...

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 to program a real-time accurate audio sequencer on the iphone?

Hi... I want to program a simple audio sequencer on the iphone but I can't get accurate timing. The last days I tried all possible audio techniques on the iphone, starting from AudioServicesPlaySystemSound and AVAudioPlayer and OpenAL to AudioQueues. In my last attempt I tried the CocosDenshion sound engine which uses openAL and allows...

Simultaneously stream and save a video?

I'm writing an app, part of which allows the user stream/play videos. I want to restrict the functionality so that they can only stream videos if they have a WiFi connection. I will then save the video so that when they have a 3G only (or lesser) connection they can't stream videos and can only replay videos that are saved on the phone. ...

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...

Switch between UITabBarController and UINavigationController

The main functionality of my app is controlled by a UITabBarController. However, I need to load a View that has a UINavigationController. When I return to my UITabBarController using self.tabBarController.selectedViewController = [self.tabBarController.viewControllers objectAtIndex:0]; My UITabBarController no longer responds ...

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...

Can Adobe Air be the best solution for a Mac and iPhone application?

We are at a crossroad as what development tool to use for our application. We do not know if we will go for Adobe Air or use the traditional road which is Objective-C and Cocoa. The software is similar to www.riffmasterpro in functionality. Is Air the best solution here? ...

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...