iphone

navigationItem.title doesnt get refreshed

Hi, I have a RootViewController and a SubViewController. I traverse the views in either direction. The RootViewController is a UITableView SubClass. Depending upon the row selected I want to change the title of the subview using self.navigationItem.title = [chunks objectAtIndex:1]; It works when the subview is first time loaded. But whe...

Additional Xcode Documentation Sets

Xcode's help system includes documentation for all the Cocoa and Carbon APIs. However, it would be nice to also have documentation for the standard C and C++ libraries, POSIX APIs, BSD system calls, etc., integrated into the same system. Are additional Xcode documentation sets available, or is there any way to integrate man pages or ot...

UITextView with 3 lines automatically scrolls up when I enter <screen capture>

I have a UITextView that i use for typing some text (i have added it with Interface builder) i have made the height 3 font lines high (so in my case the frame height is 47) so i can have 3 lines of text what i want it to do is type until line3 and the go up if i goto line 4 but what it does is whenever i type enter it automatically goe...

Where do you put global application data in an iPhone app?

I have an app that allows the user to view, manipulate and manage a collection of Schedule objects. Different parts of the app need access to this data. I've experimented with making the collection a singleton, but I didn't find that very clean. I recently changed to storing the global data in the AppDelegate class and using: MyAppDele...

How to access iPhone application directory and store image files there

I want to know whether I can access the directory where my application is installed. Also I want to create a sub directory in the same directory to store all the images I capture in my application. I further want to view the images using iPhone's default image viewer. Can this be done? ...

Using a struct with OCMock or Hamcrest

I'm hitting a road block and I'm wondering if the brilliant collective minds here can help. In ObjC CocoaTouch I'm trying to mock an object that takes struct parameters and returns a struct. OCMock is coughing up a hair-ball so I tried wrapping with a Hamcrest matcher. No die. The function/method I'm testing looks something like this: -...

How can I install a .ipa file to my iphone emulator

Hi, I have an iphone simulator running on my Mac. I have a .ipa file, can you please tell me how can I install it on the emulator? Thank you. ...

How do you explicitly animate a CALayer's backgroundColor?

I'm trying to construct a CABasicAnimation to animate the backgroundColor property of a Core Animation CALayer, but I can't figure out how to properly wrap a CGColorRef value to pass to the animation. For example: CGColorSpaceRef rgbColorspace = CGColorSpaceCreateDeviceRGB(); CGFloat values[4] = {1.0, 0.0, 0.0, 1.0}; CGColorRef red =...

iPhone How to set the top position = 0 after setStatusBarHidden:Yes ?

Dear all, I found that after setting the [[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO] at viewDidLoad, then if I want to align an image to the top, I will need to set its position as .y = -20; Is there anyway to make the y coordinate of the "top position" to "0" ? or is it doomed to be -20 after hidding the ...

UIImagePickerController does not deliver geo tag data

When I use UIImagePickerController to select a photo, either from the Camera Roll or the Photo Library, the image that gets returned to me in the method 'didFinishPickingImage' does not contain the exif data for latitude and longitude. I know that the headers are there, because they show up when imported into iPhoto, also if I upload ...

Best way to copy a PNG into a bigger blank/code generated texture? (OpenGL ES 1.1/iPhone)

I have a 320x480 PNG that I would like to texture map/manipulate on the iPhone but these dimensions are obviously not power of 2. I already tested my texture map manipulation algorithm on a 512x512 PNG that is a black background with a 320x480 image superimposed on it, centered at the origin (lower left corner (0,0)) where the 320x480 a...

Using translucent UINavigationBars

I am using InterfaceBuilder to set up my app. I have several views being controlled by a UINavigationController. In IB I set up the views using the simulated metrics to position the elements below the Navigation Bar. I have a background texture that is placed in the window object of the Main.nib so that it is shared throughout the app. ...

UIComboBox... Where is it?

So I'm pretty sure i already know the answer to this, but does the SDK include access to the combo box control used in mobile safari? It should be easy enough to build one... but I'm not looking to re-invent the wheel if I don't have to. ...

Storing passwords in iPhone applications

I have a simple application, based of the "Utility Application" template. It retrieves a password-protected XML file (via NSXMLParser). I want to allow the user to set a username and password in the "FlipsideView", how would I go about this? I have the basics in place, the two UITextField boxes, the value of which gets set to a fixed v...

iPhone development - Locate address from user's position

Hi Is it possible to get the street/area where the user currently is by using the CoreLocation framework? So if I get the user's longitude and latitude position, can I get the address (xx street, yy city, z state) from that position? Thanks. Someone had already posted the question before. Just found out http://stackoverflow.com/questi...

Going from the iPhone to the Mac?

Note: This is the opposite direction to most similar questions! I have an iPhone application which I would like to provide a demo of on the Mac. How hard is it to recompile (or rewrite) iPhone applications into Mac applications, assuming I intend to keep the same screen size, and not worry about making my application look "mac-like"? I...

How do I have a view controller run updating code when it is brought to the top of the stack of views?

Hi-- I have a viewController (Planner) that loads two view controllers (InfoEditor and MonthlyPlan) when the application starts. MonthlyPlan is hidden behind InfoEditor (on load). So my question is when I exchange InfoEditor for MonthlyPlan (MonthlyPlan gets brought to the top) how can I have data on the MonthlyPlan view be updated. ...

How to specify decimal places when formatting NSNumber objects?

I'm using the following piece of Objective-C code to format a NSNumber, and it works fine most of the time, but it doesn't quite do what I want when the NSNumber object holds an integer (no fractional part). UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(80.0f, 90.0f, 225.0f, 40.0f)]; label.backgroundColor = [UIColor clearCo...

iPhone Landscape-Only Utility-Template Application

I'm trying to create an iPhone application that is always in landscape mode, using the Utility application template. Here's what I did: Create a new iPhone application project, using the Utility Application template In Interface Builder, rotate all the views 90 degrees. In Interface Builder, add a label to the middle of the MainView. ...

What type of mac should I get for iphone development?

I understand that I need to have a mac for developing iphone applications as indicated here: http://stackoverflow.com/questions/297533/hosted-mac-os-x-iphone-development And in other locations. What I'm not sure of, however, is what kind of mac would be good for this type of development? I've never done any kind of development on a m...