cocoa-touch

TouchesBegan and TouchesEnded with Multitouch issue

I'm using TouchesBegan TouchesMoved with Multitouch. I have a manual implementation of what is essentially a button. I bounds test on the point of TouchesBegan to set the button as down and the same for TouchesEnded to reset it. The problem is if the user moves the finger out of the bounds of the button before lifting then the Touches...

CoreData and NSXMLParser

Hi Stackoverflow friends, I am parsing an XML file of the network using NSXMLParser after I got the Data from NSURLConnection. The XML has many "items" and each item contains 1 category. In the CoreData module i have an Item entity with a relationship to one Category. While parsing the XML file and hitting the message parser:didStartEl...

UINavigationController autoresizing views behavior

I've read in Apple's documentation about UINavigationController's resizing behavior and it hasn't been much of a problem until now. I have the following code to set up my UINavigationController's view: navController.view.frame = CGRectMake(0, 40, 320, 420); and this is sufficient until the view is obscured by a modal view, at which po...

CAScrollLayer doesn't scroll!

Maybe it's because it's late. Whatever the reason I can't figure out why I'm having trouble with a simple CSScrollLayer example I'm trying. I add a 50 pixel Eclipse icon to a view based project and in my initialize method (called from initWithNibName:bundle:) I have this: -(void) initialize { CAScrollLayer *scrollLayer = [CAScrollLaye...

Navigation bar not displaying

In a tab bar based app, I add a new UIViewController from tabview1 like this [self.view addSubview:self.aView.view]; I created the nib for aView in IB. It is a view with a tableview and navigation bar. I have aView and bView, which are nearly the same and added to the parent the same way. The only difference is that aView has two s...

Source of UIView Implicit Animation delay?

I have a block of UIView animation code that looks like this: [UIView beginAnimations:@"pushView" context:nil]; [UIView setAnimationDelay:0]; [UIView setAnimationDuration:.5]; [UIView setAnimationDelegate:self]; [UIView setAnimationWillStartSelector:@selector(animationWillStart)]; view.frame = CGRectMake(0, 0, 320, 416); [UIView commit...

NSThread calling threading delegate function

I am using a framework to get information from the network. The problem is the function I'm using to get the information is threaded (ie. it gives information through a didFinish selector, not the actual function as the return value). I want to create a separate NSThread that uses this threaded function. The problem is if I detach a thr...

Removing and reinserting UIView into UIViewController

I have a UIViewController that contains a UIView. Between every time the viewcontroller is displyaed, the UIView has to be cleared and the content reloaded. The problem is that the old content still appears in the UIView. Load data before controller becomes visible: - (void)viewWillAppear:(BOOL)animated { contentView = [[ContentVie...

iPhone: How to Get Location as in the App "Qype"

Hello, I've discovered today the app "Qype" and now I'd like to know how I can build a function to locate myself like in quype. For those who dont know this app: It's an app that shows you Cafés, Bars, Restaurants etc. near you. When I'm starting Qype there's a question: "Qype want to locate your position. Do you want to allow it?" Ar...

Problem while using millennialmedia ads in Iphone application

Hi All I am using millennialmedia ads in my iphone application. If we click on ads then respective link is open in iphone browser and my application running continuously in background. I want if any body click on ad then my application become pause and application without any alert. How we get that event. Thanks Amit Battan ...

Wipe a delete button out of table view cell

Hi, when pressing a row delete button on a table view, I do some validation, and if the user chooses to cancel the operation it all should rollback. Not only want to keep that row (what is happening), but also make disappear the delete button leaving only the "-" round button. How can I do that? once again, thank you. ...

Which UI Design is better for iPhone?

I have a PickerView for choosing time. For example, the user can choose 5 hours and 10 minutes. I should use one picker view to display two row... or I should separate to two picker view, in the middle, I use a label "hour", and "minute". Which UI design is better? and why? thx you. ...

IPhone Application Design Decision?

I am writing a simple application that follows the MVC design pattern. In the Xcode project I have three bits: AppDelegate ViewController DataModel The DataModel object holds all the data for the application and I want to make sure it is saved on app-exit and reloaded at app-startup. I am not sure if this is the correct approach, I ...

Simple MVC setup / design?

I just want to make sure that I am heading in the right direction with how a simple MVC application is constructed. // MODEL @interface Reactor: NSObject { NSNumber *temperature; NSString *lastInspection; NSNumber *activeRods; } . // CONTROLLER @interface viewController: UIViewController { UITextField *tempTextFiel...

Core Data 1-to-many relationship: List all related objects as section header in UITableView

Hi: I struggle with Core Data on the iPhone about the following: I have a 1-to-many relationship in Core Data. Assume the entities are called recipe and category. A category can have many recipes. I accomplished to get all recipes listed in a UITableView with section headers named after the category. What i want to achieve is to list all...

three20 App crashes after some view changes

hi everybody, first, i followed this tutorial: three20 github tutorial i have a memory management problem i think, which crashes my application. i think, _properties in my postsModel crashes my application. the first time i launch my application and changing view to my postsTableViewController works quite fine. i created a TTLaunche...

Installing a configuration profile on iPhone - programmatically

Hi all, I would like to ship a configuration profile with my iPhone application, and install it if needed. Mind you, we're talking about a configuration profile, not a provisioning profile. First off, such a task is possible. If you place a config profile on a Web page and click on it from Safari, it will get installed. If you e-mail...

When last row in section of UITableView with Core Data is moved -> NSRangeException

Hi: Moving rows between sections in Core Data backed UITableView works quite fine after I've implemented a 'userDrivenChange' check in 'controllerDidChangeContent:', as mentioned in the apple docs. But only when moving the last row of a section to another section I get a NSRangeException. There is obviously a problem when sections get e...

NSCollectionView for Cocoa-Touch (iPhone/iPad)

Is was starting to implement one but was wondering if somebody knows about an already existing NSCollectionView like class for cocoa touch. ...

SQLite, iPhone and versioning

I want to include an updated SQLite database with a new version of an app. My app copies the database file into the Documents directory on startup. What is the best way to do this kind of versioning (besides using Core Data)? I'm assuming that either a special 'version' table in the SQLite file or a small text file with the version numb...