cocoa-touch

Is there a way to find out if iPhone obtained CLLocation by A-GPS, cell tower signal strength or wifi?

Hi, I'm trying to find a property that indicates how iPhone physically obtains CLLocation? As far as I am aware iPhone gets CLLocation via either: 1) GPS 2) Cell tower triangulation 3) Wifi ID and signal strength Can I programmatically refer to something in the publicly accessible libraries to get this? If there isn't a way to ident...

Core Data store disappears when app is removed from task list in 4.0

Under 4.0, my iOS application which uses Core Data loses all stored data when the application is suspended and subsequently removed from the background task list. Data persists fine between suspensions, but when the app is killed, there is no data on relaunch. Under 3.1, data persisted just fine between quits/relaunches of the app. Do...

GKSession sendDataToAllPeers:withDataMode:error: is asynchronous - how to get news of when it's done?

GKSession sendDataToAllPeers:withDataMode:error: is asynchronous ... or so I understand. Short of the peer sending an application-level ACK (which would be very clunky) is there a means of finding out when it's done sending? M. ...

MPMoviePlayerController not getting touches

I have a MPMoviePlayerController which resides int a UIView which again is located in a UIScrollView. The UIView is getting event/touches, but I am unable to press on the controls on the movie player. All layers have userInteractionEnabled = true. The base view also has UIGestureRecognizers attached to it. How can I trace the path of a...

Activating the iphone keyboard

I cant believe that I haven't been able to find any documentation on this yet but I was wondering how to command the keyboard to activate and receive input from it. All of the examples I could find where for manipulating the keyboard that would pop up because of a text field being edited. Thanks ...

Cocoa Touch: How can I access resource sub-directory?

Currently I am working on iPad. In the Resources folder of project, I have a sub-directory "sounds". How can I access it to get the contents of this sub-directory? I have tried: NSArray *array = [fileManager directoryContentsAtPath: [[[NSBundle mainBundle] bundlePath] stringByAppendingString:@"soun...

MPMoviePlayerController irreversibly switching to playbackState "paused"

Hi all, I'm using a single instance of MPMoviePlayerController to playback short clips (3-10 Minutes) via HTTP-Download in an iPad-Application. This usually works nicely, but in rare cases the following pattern occurs: A video starts playing (usually 1 up to 4 seconds of it) The playbackState switches to MPMoviePlaybackStatePaused. Th...

How can you measure speed at which the user is moving their finger across the iPhone/iPad screen?

I'm diving into iPhone development and I'm trying to get my head around gestures and the touch events. How can I measure how fast the user is moving their finger across the screen of an iOS device using the touche events (touchesBegan, touchesMoved, etc)? Thanks so much in advance for your help! ...

problem with tag in UIView

HI I have created a chain of UIViews(like tableview cells) on a content view and each UIView has a button on it which(button) has a unique tag associated with it. Now what I am doing is when the user taps a button a tableView gets loaded just below the view which contains the button which was tapped and the below UIViews gets shifted t...

UIWebView, goBack accessing back-forward list?

Hi, I am just having a quick look at UIWebView and have written a small browser with a back button, a UITextField and a forward button. Here is what happens: I enter "www.google.com" into the textField and it goes to the page. The textField says "www.google.com" I enter "www.apple.com" and it goes to the page. The textField says "www.a...

How can I sense the user is holding down their finger on the screen without moving?

The best method I can think of is to start a timer in the touchesBegan event method. If the timer expires before the touchesEnded event arrives, then you know the user is holding down on the screen. If the touchesMoved event is called, then simply reset the timer so as to only detect holding down without movement. Is there any functi...

App design: UITabBarController within UINavigationController

I have a very specific application design that I'm trying to figure out how to create with iOS 4. Here's how it works: The user selects an installed data set, or triggers a data set download. The user provides a key for decrypting the data set. A tab bar is shown with different search options for looking at the data. There are more se...

webViewDidFinishLoad: Missing Protocol?

Can anyone just clarify this for me, I was under the impression that to use webViewDidFinishLoad: I would have to conform my class to <UIWebViewDelegate>. However I forgot to do this but found it still works where I was expecting an error/warning. Can anyone explain for me? -(void)webViewDidFinishLoad:(UIWebView *)webView { // do st...

add Toolbar above UITableView for use in UISplitViewController detail view

I want to use a table view as the detail pane in my UISplitViewController. How do I put the toolbar at the top? I want to be able to add bar button items in the same way as my non-table detail views. Thanks. ...

Flick motion for iPhone

Hi all, I am in the process of developing a project that will require the flicking or FLICK MOTION of an object such as a ball...obviously it will have to travel through a trajectory based on the position and the path travelled by the finger on the iphone screen...Please can anyone help me out with the code or how to go about getting t...

Illegally mutated the NSFetchedResultsController's fetch request

I'm getting the following exception is thrown under iOS 4.0 but not under 3.0 using core data. I'm populating a tableview controller with data from a core data store. Then drilling down on a row and requesting the details for that row and passing them onto a detail view. FATAL ERROR: The persistent cache of section information does not...

calculating height of UITabBar

I'm writing an app that uses UITabBar for parts of the navigation. I'm also using UIScrollView for presenting more information than what the screen can typically handle. Because of this, I'm needing to set the scroll view to take into account the height of the UITabBar so that all of the information is displayed. Is there a way to calcu...

Dictionary popup on iPhone (like iBook)

I am currently displaying text in a uiwebview. However I would like to allow a user to click on a word and register an event. Apple has one is sort of thing with iBook. When you click on a word you can choose to look up the word in a dictionary. How can I do the same thing with Web view? I have thought about making every word a link...

Facebook tutorial iphone

How to use the Facebook iphone sdk?I want to make a facebook application that will have a search bar and after entering data in the search bar whatever information will be returned from the facebook database i need to display it in the tableview...please help me in this regard ...

Received memory warning. Level=2. Data Formatters temporarily unavailable, will re-try after a 'continue'.

I am using cocos2d 0.99.4 and Xcode 4.0. so, I changed my AppDelegate in this way according to the documentation and example given in 0.99.4 version. - (void) applicationDidFinishLaunching:(UIApplication*)application { window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; [CCDirector setDirectorType:kCCDirect...