cocoa-touch

Class initialization breaking application

I've recently created a new class for my iPhone application which will hold information read from a text file containing the street address and GPS points of points of interest. The issue though is that whenever I add code to initialize the class my application loads up and the instantly quits with no errors in the console. When I remov...

Searching results are always 0 (NSArray and NSPredicate)

I have an NSArray which holds Foo objects defined like so: @interface Foo : NSObject <NSCopying> { NSString *name; } @property (nonatomic, retain) NSString *name; @end and the query: NSPredicate *filterPredicate = [NSPredicate predicateWithFormat:@"name BEGINSWITH[cd] %@", filterString]; //NSPredicate *filterPredicate = [NSPredic...

NSNotificationCenter: How long does it take to perform an operation

I want to know how long does it take from posting a notification to getting the notification. The reason is that I want to find out if the observer pattern is suitable for me. I don't want that another view controller can change the value before the notification has been sent and processed. I'm afraid that another process (thread?) is f...

How to create a Speech bubble in cocoa-Touch

Hi, How can I create a speech-bubble like context menu like in the Safari-Browser on the iPhone/iPad. I would like to create a kind of context help. Thanks in advance, Stefan ...

How can I programmatically set the background color of a UILabel?

Hello. I'm diving into iOS development and I'm programmatically creating some labels, but I can't seem to set their background color to black. From what I read, it seems simple enough, here's my code... UILabel *lbl = [[[UILabel alloc] initWithFrame:CGRectMake(x, y, width, height] autorelease]; [[lbl layer] setBorderColor:[[UIColor bl...

How do I check to see if an iPad has an e-mail account setup and active in Cocoa Touch?

I have a modal e-mail construction window that comes up in my app but if I disable all email accounts on my iPad that modal window freezes when called. I would like to check if an e-mail account is active on the device before calling the window...anyone have any ideas? ...

Is there any reason to use Core Graphics data types when working with UIView objects

Is there any real need to do this: CGFloat x = 10.0f; CGFloat y = 20.0f; someView.center = CGPointMake(x, y); Instead of this: float x = 10.0; float y = 20.0; someView.center = CGPointMake(x, y); ...aside from style considerations? Are there any performance implications at all? ...

I dont know how I can save project to ipa

Thank you I learned a lot from this site I have a question I finished the application is running webview But I remain one step keeping the program And send it to the iPhone to try it on two ipa I want to save formulas ipa Thank you ...

Are IPhone apps guaranteed to work on iPod touch?

Since, I don't have the iPod touch simulator in xcode, and I don't have an iPod touch device there's not much of a way for me to test my app on this device. Since it works on iPhone 3gs and iPhone 4 can I safely assume it works on the iPod touch too? Thanks! ...

App-store: Is it a good idea to include a youtube video link in the description of an app?

Will the viewers be able to click on a link from a description or is this not possible as far as how the app-store works? I'd like to show the users what the app will look like before they buy it by showing them a video of it on youtube. Thanks p.s and no, this is not a marketing question. Only programmers know the answer to this ques...

iPhone read image from socket

I am working in a little app for iphone base on ideas used to make an Android app. To test, obviously i use the simulator, but the simulator don't have support for built-in camera. The Android idea to test this consist in use a WebCamBroadcaster Java app in the desktop to capture frames from built-in webcam and pass it through socket. Th...

What's the best option for loading web content in a UIWebView?

In previous apps, I've loaded data into a UIWebView using 4 steps: 1. Use an NSURL Connection to grab the data from the web asynchronously 2. WHen the download is complete, convert the NSData object to a string, and manipulate the data prior to display. 3. Write the converted data out to the doc folder 4. Load the data into the UIWebVie...

viewDidAppear called twice, but viewWillAppear called once

I have discovered that when my program starts, in one of my viewcontrollers the order of calling is viewDidAppear, viewWillAppear, viewDidAppear. I was not expecting the first viewDidAppear to be called. What could be causing this and how do I fix it? ATM I have a flag in viewDiDAppear to check if viewWillAppear was called, but it's a h...

Animating Row Deletion in UITableView with CoreData gives Assertion failure

Hi all. I have a UITableView that shows a list of objects stored with CoreData. I can delete an object using the following code: - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { ...

How to create shadow effect of UIScrollView, UITableView when scrolling?

Hi, I have a UITableView and I would like it ho have the same effect when scrolling as the picture. (Shadow below UINavigationBar and above of UITableView) How can I do this?: ...

iOS YouTube and Safari-like movie player

This is probably a dumb post but I've Googled it for about an hour now and can't find anything about it anywhere... I'd like to know how I can have a little movie "square" similar to the ones presented in Safari to play Quicktime Movies or YouTube movies. I'm talking about that :). Is that an Apple private API or can we use the API? ...

How to resume iPhone app after a Phone Call

Hi there, I am creating an iPhone app in which I am providing a call feature with the help of which a user can call place a call on a specified number. I am able achieve the above feature via open URL. Now after completion of the call I want to resume the execution of app automatically. Although a user can make a fast app switch in iOS...

read version from info.plist

I want to read the bundle version info from info.plist into my code, preferably as a string. How can I succeed? ...

how do I know when UIKeyboard Join button is tapped?

How do I know when a user taps on the Join button on the UIKeyboard? Also can this text be changed? I know there are several built options but I nee done that says 'Login' if I can. ...

How to implement a Modal View in a TabBar iPhone app

I am trying to present a modal view in a tabbar app. I am using the code - (IBAction)newView { [self.viewController presentModalViewController:viewController animated:YES]; } linked to a button. When the button is pressed, nothing happens and nothing is displayed on the log. This is most likely simple to fix, but I have not found any...