iphone

Click button and load navigation controller

Hi all! A very simple question: My iPhone app has a button in MainWindow.xib. When I press that button a new view should load. That view will contain a nice navigation controller. How can I do that? All the information I've found is about apps that start directly from a navigation controller. I need to load the nav controller after a bu...

Rendering UIView with its children (iPhone SDK)

I have a UIView that has an image and some buttons as its subviews. I'd like to get a "snapshot" image of it using - renderInContext, or other method. [clefView.layer renderInContext:mainViewContentContext]; If I pass it my UIView (as above) then I get a blank bitmap. None of the children are rendered into the bitmap. If I pass it t...

How can I write an function in objective-c, that I can use over any object in my iPhone app?

I want to create an function which I pass an object. Then, this function should print out some information for me. like: analyzeThis(anyObject); I know about methods, but not how to make a function. As I understand, a function works global in all methods and classes, right? ...

iPhone - how to get user's date format

Hi, How can I know what date format user prefers? Is there a way to read it from phone's local settings? Does the user prefer to read date in format "dd/mm/yyyy" or "mm/dd/yyyy"? Thank you in advance. ...

What is the isa instance variable all about?

In the NSObject Class Reference they talk about an "isa instance variable" which is initialized to a data structure that describes the class can someone explain what I should know about this isa instance variable? What is that good for? What does isa mean? Sounds like a norm, like DIN, ISO, etc.; Any idea what that is? ...

What does this mean in iphone programming?

#pragma mark Internal API I've seen this in a book called xcode_quick_tour_iphoneOS. Does someone know about it? ...

Set a navigation controller without an app delegate

I would like to show a Navigation Controller after clicking a button. Every tutorial assumes the navigation controller will be the first screen so it links it to the App Delegate, but App delegate only appears at MainWindow.xib. How do you guys add a navigation controller to a view different than the MainWindow? Thanks! ...

Gap on Navigation Controller

I've got a button on a view. When I click on it, it should load another view, one with a novigation controller. So far I've got this, the button calls this method: -(IBAction)loadOptionsView:(id)sender { if (self.optionsRootController == nil) { //optionsRootController is declared as: UINavigationController *optionsRootC...

How to get a list of the playlists and songs in an iPhone/iPod Touch?

Can I get a list of the playlists and songs in each playlist in an iPhone? This is for a legal app. so hidden APIs/jailbroken solutions don't apply. ...

iPhone App : Where do I put a config file ?

In my app, I have a simple ASCII file which stores some config info and other small info which it uses and changes. I want to copy that file to the iPhone with the app. 1) Please tell me where I should put this file (config.txt) in xcode. Should I put it under Resources ? 2) How will I access it in the iPhone ? Can I just use str =...

iPhone - how to save user settings from application?

Hi, What is the easiest way to save a couple of variables in an iPhone application in a long-term memory? I have an application that works with different sqlite databases and I want after exiting from an application to save last active database name in order to open last database when user enters an application again. It's a little bi...

Where is the TickCount() call?

Where is the TickCount() call? I have seen several threads on the web that recommend using the TickCount() call for iphone development. What do i need to "#include" to use this call? What framework is it in? If not TickCount() what should I use to get milliseconds elapsed since the cpu started? ...

How to output frame positions in debugger?

I have a UIIMageView and want to output values such as: myobject.center.y myobject.frame Basically, position and size information. I'm using both "po" in the console and breakpoint actions with @@ but neither works. I always end up with an error such as "There is no member named center". How do I output these values in both the de...

iPhone development on a jailbroken phone

I have a jailbroken phone which for whatever reason will not work when I try to restore the original software. So I'm stuck on the jailbroken version. Will there be any problems in joining the Apple developer program, getting my app loaded onto my phone for testing, and then getting my app into the app store? ...

iPhone Data

I'm trying to extract about 72000 SInt32s from the iPhone, but not sure what the best approach is. Using printf or NSLog to the console basically crashes my program and my computer. I tried redirecting stderr to a file, but I run into the same problem. Was wondering what the best way is to extract this data so I can later use it on my...

Custom Keyboard on iPhone

What's the easiest way to implement a custom keyboard on the iPhone? I basically want an action sheet that keeps part of my interface visible, but I want to load my own view into it, preferably via nib. I've been looking into modal views, but I'm getting the feeling I'm going in the wrong direction. ...

iPhone raw touchscreen data

Hello, I know in my iPhone app I can get touch events. But these touch events are filtered for me. If I press the device against my face, it filters out these touch events because it can detect its not a finger. How would I get the raw touch events, not filtered in any way? Thanks. ...

Why don't I have to release these objects?

Here's an sample code, where only the "string" object is released. NSString *nameOfFile = ... ; NSError *error; NSString *string = [[NSString alloc] initWithContentsOfFile:nameOfFile encoding:NSUTF8StringEncoding error:&error]; if (string == nil) { // handle error } [string release]; I understand why the error object is not releas...

iphone app submission. creating screen shots.

When submitting screen grabs for an iphone app during the approval process, is it ok to submit screens that are different than what is represented on the app itself? for example, i wanted to submit a screen where i explain some of the features of the app but not necessarily a screen grab. all the best. ...

Where is the difference between Retain Counting and Reference Counting?

I feel that both are the same thing, but I am not sure. ...