iphone

Scrolling background image for UITableView?

There are currently a lot of answers on how to set a custom fixed background for a UITableView. But is there any trick to make the background image scroll together with the table cells? Thanks! ...

View loaded from nib will not update contents of UILabel while running in a method

Hi, I am having an issue with updating the contents of an "myInfoBox" object I created to be displayed while some background processes are done. In the delegate method I am creating a new viewController: -(void)loadMainView { myFirstViewController = [[MyFirstViewController alloc] initWithNibName:@"MyFirstView" bundle:nil]; ...

How can I have references between two classes in Objective-C?

I'm developing an iPhone app, and I'm kinda new to Objective-C and also the class.h and class.m structure. Now, I have two classes that both need to have a variable of the other one's type. But it just seems impossible. If in class1.m (or class2.m) I include class1.h, and then class2.h, I can't declare class2 variables in class1.h, if ...

[iphone] How to rotate image around center point automatically with finger touch

On iPhone, how to implement rotating image around the center point using finger touch ? Just like wheel, if you put finger on the iPhone screen , then move suddenly, then the image becoming rotating around center point just like the wheel, after a while, it becomes more and more slow , finally stop. Who can help to give some pieces of ...

cell.accessoryType disappearing issue

I have setup custom UITableViewCell from code. In my cell, I have a "UITableViewCellAccessoryDisclosureIndicator". When highlighting the cell, it goes blue, and the accessory item turns white. So that's all good. However, when tapped and a new view is pushed, the accessory item disappears. When I go back to the tableview the UITableView...

Iphone, Cocos2d

Does anyone know how to install cocos2d so it shows up in the new projects template window? ...

Long polling with NSURLConnection

I'm working on an iPhone application which will use long-polling to send event notifications from the server to the client over HTTP. After opening a connection on the server I'm sending small bits of JSON that represent events, as they occur. I am finding that -[NSURLConnectionDelegate connection:didReceiveData] is not being called un...

Help with dictionaries, arrays and plists on iPhone

Hi everyone, I would appreciate some help with something I working on and have not done before now and having some proplems because I don't think I understand exactly how to do this. What I'm wanting to do i'm sure is simple to most all of you and will be to me as soon as I do it the first time correctly....anyway.... I have a tableview ...

UIView alpha problem

Hello. I'm having problems setting the alpha value of a UIView subclass object. Any suggestions? I have UIView project whose alpha property I'm manipulating to control brightness. I'm using a UISlider control to set the value of the alpha property in a UIView subclass as follows: -(id)initWithFrame:(CGRect)rect andParent:(id)thePare...

release/autorelease confusion in cocoa for iphone

I'm slowly teaching myself cocoa for the iPhone(through the Stanford Class on iTunes U) and I've just gone through the part on memory management, and I wanted to hopefully get some confirmation that the assumptions I'm making on how memory is handled and how [release] and [autorelease] work. Since memory management is a really basic and...

UILabel - Wordwrap text

Is there anyway to have a label wordwrap text as needed? I have the line breaks set to word wrap and the label is tall enough for two lines, but it appears that it will only wrap on line breaks. Do I have to add line breaks to make it wrap properly? I just want it to wrap if it can't fit it in horizontally. ...

iPhone speech recognition API?

The new iPhone 3GS has support for voice commands, stuff like "call Bill" or "play music by the strokes" and whatnot. I was looking through the iPhone SDK, but I cannot find any references to this capability. All of the search keywords I choose seem to only find the new voice chat functionality. Does anyone know whether Apple has adde...

Is there anyway to show View without pushing it to Nav Controller

Hi, I've a question, I want to show a View with out Pushing it to nav controller, it is very similar as with Native email UI, you go to Inbox folder and there you select "Compose" screen, compose screen is just animate from bottom to up without pushing this screen to nav controller. How can i do the same thing? Thanks for your time an...

Intercepting/Hijacking iPhone Touch Events for MKMapView

Is there a bug in the 3.0 SDK that disables real-time zooming and intercepting the zoom-in gesture for the MKMapView? I have some real simple code so I can detect tap events, but there are two problems: zoom-in gesture is always interpreted as a zoom-out none of the zoom gestures update the Map's view in realtime. In hitTest, if I r...

Array from iPhone plist

I am trying to get an array from a plist as suggested on an answer here but it's not working. Can someone tell me what I'm missing? Here is what the plist looks like....another weird thing is that I can't get this to open in a plain text file?? when I do it looks like garbage.....but it looks fine in the property list editor: <?xml ver...

Dynamic Button Layout without hard coding positions

I would like to implement a view (it will actually be going into the footer of a UITableView) that implements 1-3 buttons. I would like the layout of these buttons (and the size of the buttons themselves) to change depending on which ones are showing. An example of almost the exact behavior I would want is at the bottom of the Info scree...

UIButtons on tableFooterView not responding to events.

I've successfully added some UIButtons to a custom tableFooterView. The problem is that the button events does not get called. Also, the image relative to the UIControlStateHighlighted doesn't come up. Any ideas? I've tried all I could think of, but I can't find the trick. I'm reporting here the interesting part of the UITableViewContr...

xCode is demanding symbols that are already there

The voodoo involved in iPhone development never ceases to amaze me. Here's the latest hex that has been cast upon me. I am developing an app that uses the routeMe library to display maps. I'm testing things in the simulator and everything works great. The app also uses the GPS features on the iPhone so I decide to plug it into the de...

How can i get OCMock to let me stub a category method on a UIKit class?

I'm trying to mock a UITabBarController in my app's tests. I have a category method on that class defined elsewhere in another file that gets imported along with ocmock in my test class. what i'm trying to so is this: - (void) setUp { id mockTabController = [OCMockObject mockForClass:[UITabBarController class]]; [[[mockTabCont...

When does a touchesBegan become a touchesMoved?

When you drag a finger across the iPhone touchscreen, it generates touchesMoved events at a nice, regular 60Hz. However, the transition from the initial touchesBegan event to the first touchesMoved is less obvious: sometimes the device waits a while. What's it waiting for? Larger time/distance deltas? More touches to lump into the eve...