iphone

Crashing while trying to move UITableView rows

I've got some rather complicated rules for moving rows around in a UITableView. There are an undefined number of sections and rows per section, and based on various rules, rows can be moved within or between sections by the user to specific other locations. All of the data updating and everything is working. But occasionally, after mo...

iphone app UIAlert

I have an app that has a "store locater" in it. If there is no store within the range being searched there is a UIAlert that shows saying there is no store in that range. It works in simulator mode, but not on my iphone...any ideas? Here is the code: if([cities count] == 0) { UIAlertView *alert = [[UIAlertView alloc] initWithT...

iPhone Core Data saving multiple items at once random behavior?

Hello, I have an application that reads an rss feed, parses the xml and adds it to my database using Core Data (this is so the user can see the feed even if no internet connection is available) this all works fine. The way I am doing the parsing is: on the didStartElement i create a new Entity such as: NewsDB *newsDB = [NSEntityDescrip...

iPhone animation problem SImulator vs Real Device

Hi! This is my first question her so please be gentle: I have followig animation code running smoothly on the simulator as well as on the real device (I am testng on iPhone 3GS 3.1.2). Animation is a simple transition between the 2 views, something like book page flipping. One diffrence betwen simulator an real device (The problem I can...

How to split an entity in Core Data migration mapping

It seems like this should be straight forward but I have not been able to find a good example of it. I have a simple Core Data entity that I want to split into two separate entities. Apple's documentation mentions it at a high level (Mapping Overview), however, it is unclear what the actual mapping model should look like to associate t...

type degrades when button is clicked

I have a UITableViewCell with a custom UIButton and UILable in the contentView. The button is a checkbox and toggles between a checked and unchecked state, with different images for each state. If I click the button multiple times the characters in the UILable degrade visually, a little more with each click. Im using Helvetica-Bold in th...

Optimum ordering for packed vertex arrays on iPhone

Is there an optimum packing format for vertex arrays on the iPhone hardware? My textured (triangle) arrays are ordered: Vertex (x, y, z) Vertex Normal (x, y, z) Texture Coordinates (u, v) This is the way I've always done it. Should the UVs come before the normals? I'm not sure if it matters. I'd assume that the texturing & lighting u...

100% opacity UILabel over a 50% opacity background (UIView?)

So right now I have a UIView with a UILabel in it. I want the background to have an opacity < 1.0 and the label to have an opacity of 1.0. However since alphas propagate down the view hierarchy, the label ends up with an opacity < 1.0 as well. Is there anyway to do what I want without making the UILabel a subview of another view?? ...

The internals of route-me? I need to add my own tile source

Hi there, (route-me is an iPhone map library, http://code.google.com/p/route-me/ ) I have a map app based on web and it works fine now. Recently I need to make an iPhone client for my map. But here is the problem: My map got an images size of 300x300 and zoom levels with 1-13, and the scales are also different (Meanwhile it seems rout...

How to determine the cursor position of a UITextField?

I have a text field that is always of the format "XX0000000XX", X being a letter, 0 being a number. I switch keyboards as the user is typing depending on whether they need to enter a number or letter. This works fine, until the user positions the cursor in the middle of the text field to make an edit. How do I determine the cursor pos...

UIScrollView offsetting content double the requested amount

The Issue My PSWSnapshotView's end up exactly snapshotIndex too far to the right inside the _scrollView (40px offset). Yet, they are set with their frame to have the first one at (0, 0), though that first one shows up at (snapshotInset, 0) instead :/. The Code - (void)layoutViews { CGRect frame = self.frame; CGFloat pageWidth ...

Scaling Problem in UIScrollView

Hi, I have two UIView in a UIScrollView with the same size, UIView *view1; UIView *view2; Now my view1 is the content view, so, -(UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView { return view1; } So that it will react in the pinch or expand gestures. Now I want is if the scale reaches 0.5f the content view wil...

Language Mixing: Model and View

Consider developing an application where the model will be written in C++ (with Boost), and the view will be written in Objective-C++ (with Cocoa Touch). Where are some examples showing how to integrate C++ and Objective-C++ for developing iPhone applications? ...

Does updated provisioning file require new build?

If I add someone to my adhoc provisioning file, can I just send them the last build and provisioning file? Or do I need to do another build with the updated provisioning file? ...

How do I replace the back button with another UIBarButtonItem in a navigation controller when editing?

I have a standard UINavigationController setup. One particular view displays an "Edit" button on the right side of the Navigation Bar. When that button is pressed and the view switches to editing mode I would like to replace the "Back" button on the left side with an "Add" button. Of course, when editing is finished (the user presses ...

potential leak? - analyzer

analyze state leak problem, why? + (DebugOutput *) sharedDebug { @synchronized(self) { if (sharedDebugInstance == nil) { [[self alloc] init]; } } return sharedDebugInstance; } ...

Editing Address book Programatically - iphone

im able to add contact to address book now after adding the contact whil clicking on edit button the button should change as done how to handle ?? ...

CGRectIntersectsRect fails when the imageView is rotating.

Hi all, In my current project, i am moving a car in all directions. It is rotated also. During rotation the frame of the car changes and hence even if it doesnot collide with another imageview, it shows that the frames are colliding. That is because of change in the frame of the car imageView during rotation. So what can i do to find th...

chopping deadspace out of UIViewAnimationTransitionCurlUp?

I'd like to utilize UIViewAnimationTransitionCurlUp more often in my applications however it has a very annoying trait... namely that the first 20% to 35% of it is non-action... I know this is the case because I set an animation duration to 20 seconds to confirm my suspicions that the culprit wasn't simply setup time internal to [UIView]...

How can a Hashtable access data from a text file in Objective-C??

Hi, I have already created a project to read a file and also to display it. Now i need to create a hashtable and access the data from the created file( text file ) in Objective-C for iPhone-OS. Pls do give suggestion... ...