iphone

Syncing a mobile (iPhone) app with web app

Hello, I'm building an iPhone app / web application, and I'm trying to think through the best way to have two-way sync of the databases. I'll probably go with sqlite on the iPhone and mysql on the web (as that's what I know) but am unsure of how to handle keeping them in sync. Here's a sample schema: index_id(autoincrement) | title | ...

iPhone subview design (UIView vs UIViewController)

I'm designing a simple Quiz application. The application needs to display different types of QuizQuestions. Each type of QuizQuestion has a distinct behavior and UI. The user interface will be something like this: I would like to be able to design each type of QuizQuestion in Interface Builder. For example, a MultipleChoiceQuizQuesti...

Objective C: How do I make an NSMutableSet of NSMutableDictionaries, and have them be unique based on one of the dictionary values?

The reason I'm asking this is because right now I use an NSMutableSet of integers and a corresponding NSMutableArray to store the rest of the data, but I think I'm not using the language right. Here's my code: In the init function: self.markerList = [[NSMutableArray alloc] init]; self.markerIdSet = [[NSMutableSet alloc] init]; And t...

UIScrollView as image viewer

I have to use UIScrollView as image viewer like Photo app. The UIScrollView is supposed to show photos with swiping, zooming and rotating with interface rotation.i have to load minimum 20 images.is it possible? which is the best way? plz post some sample codes. ...

UIViewController manual instantiation within application delegate

I'm just starting iPhone development (coming fron a .Net world) and have been going through many "Hello World" applications to get the hang of this new development platform. One area I have been confused with is the instantiation of a view controller. On an Apple "Hello World" tutorial, they start by creating a Window Based App, which by...

tableview delete row problem

I have an tableview in my uiviewcontroller classes.. I have deleted row in tableview. In the debugger console it shows an error is 0x939fe688 <+0024> mov 0x20(%edx),%edi My application terminated.. Can anyone help me? Thanks in advance.. ...

How do I initialize a store with default data in a CoreData application?

Hi! I'm doing an iPhone application. In this app, I just want to have a database to be used as a looked up table for values in my app. The only thing the database will do was to supply me the values I needed depending on the query of the program. It won't do any addition or deletion in the database. My question was how do I initialize a ...

iphone Consistently Hide Some Text in a UITextView

I have a UITextView that I'm trying to keep hidden from the user, except I'm using it's autocorrect interface so I can't just put it's hidden property to true. Currently I am putting the contentOffset such that it hides the first line of text, however this does not consistently work. Sometimes it does, other times the scroll view re scr...

Difficulties with iPhone ad-hoc distribution for testing

I'm attempting to do an ad-hoc distribution of my (first) iPhone App to a small group of volunteer testers. I've looked through Apple's documentation, as well as a number of blog posts, but am still having trouble. I have a couple questions about things that aren't clear (to me, at least): When creating Development and/or Distribution...

Inability to delete table cells after a certain point.

I have built an app which has the ability to delete cells from a table, but only if there are more than two cells. If there are two or less cells, it only lets me select them. Any ideas? Here's a video to visualize it: http://slavingia.com/etc/helpme.mov ...

iPhone 3.0 WebView Scroll PDF Error - [NSCFDictionary _absoluteLinkURL]

I have a WebView which loads a PDF file: [myWebView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:fileName ofType:@"pdf"]isDirectory:NO]]]; It works fine on iPhone OS 2.x but on iPhone 3.0, when I tap the PDF for scrolling, this error appears, and the app crash: -[NSCFDicti...

Can an object be a delegate for multiple delegators?

I'm not sure about my terminology here, but: I have a ViewController in an iPhone app that needs to be a delegate for two other objects (delegators). Is this possible? This does not work: @interface my_projectViewController : UIViewController <DelegatorOne> <DelegatorTwo> { ... } ...

UIWebView EXC_BAD_ACCESS crash

I'm experiencing crashes of an app that uses UIWebView. Usually it's when page is not fully loaded and UIWebView is sent stopLoading selector. Or when UIWebView fully loaded page. I've got EXC_BAD_ACCESS. Stack looks like this: #0 0x95bb7688 in objc_msgSend #1 0x30a671db in -[UIWebView webView:decidePolicyForNavigationAction:request:f...

Is there an easy way to store a reference to an arbitrary instance variable in an array?

I want to store instance variable references of aribrary objects in an array, so that I can iterate over the array and set these instance variables. Would I have to provide their memory addresses to the array? like [arr addObject:&anIvar]; ? ...

What's the difference between using CGFloat and float?

I tend to use CGFloat all over the place, but I wonder if I get a senseless "performance hit" with this. CGFloat seems to be something "heavier" than float, right? At which points should I use CGFloat, and what makes really the difference? ...

Resizing a UITextView with a maximum height

Hi all :) I am displaying some text from a sqlite3 database and would like the UITextView to resize automatically depending on the amount of text. I can do this fine as follows: TextLabel.scrollEnabled = YES; TextLabel.userInteractionEnabled = YES; [TextLabel setFrame:CGRectMake(55.10, 26.15, TextLabel.contentSize.width, TextLabel.co...

iPhone error:cannot find protocol declaration for MPMusicPlayerController

Hi i have the following error in my code error:cannot find protocol declaration for MPMusicPlayerController and am completely stumped as to what it means. Any insight into this is greatly appreciated. ...

MKReverseGeocoderInternal Memory leak

Code: geoCoder =[[MKReverseGeocoder alloc] initWithCoordinate:UserLocation]; where to release geoCoder though i release in dealloc method it give me memory leak ...

NSDictionary WriteToFile fails

I can't work out why it keeps failing. It returns NO. I have searched this all afternoon, but nothing explains why or how to fix. Calling [[NSFileManager defaultManager] isWritableFileAtPath:] returns NO, which leads me to believe that the existing plist file can not be overwritten, but I can't work out how to change this. ...

Compiling Tux Rider

Tux Rider is an iPhone port of the famous Tux Racer game. As it's GPL software, the source is available on the author's website. I downloaded the source, but can't get it to compile as it's missing resources. Specifically, I get the following compile errors: Rider: No such file or directory World: No such file or directory Challenge...