Tag: cocoa touch

Search occurrences of a string in a TextView

I have a textview with a large text, and I would like to find all the occurrences of a string (search) inside it and every time i press search scroll the textView to the range of the current occurrence. thanks

UIView two animations coexisting

How can I have one animation continue forever after calling a second animation? For example: 1) start an object pulsating 2) Move it while its pulsating 3) it continues pulsating Everything works except the second animation is stopping the first one indefinitely. Below is some sample code: //Pulsate ** [UIView animateWithDuration:0.25 delay:0 options: (UIViewAnimationCurveEaseOut | […]

Bug in XCode debugger?

I am working on an iPhone app which is using an external library for which I have the source. During debugging some of the objects are listed as 0x0 in the debugger but the app runs fine. Also, some of the objects addresses point to the wrong thing. These symbols are in the external library. […]

Conditional Segue from UITableView to DetailView based on object state

I’ve set up the Xcode storyboard of my drill down table to branch out to two detail views. I want it to segue to either one based on the status of the Budget object that I tapped in the table view. If the budget object has not been initialized, I want to to segue to […]

NSLog of the current ViewController class name from AppDelegate.m

How can I generate NSLog from the current ViewController class name? – (void)applicationWillResignActive:(UIApplication *)application { NSLog(self.window.rootViewController.class); }

cocoa error 134100 again – (Model used to open is incompatible from model used to create…)

I have seen this question posted here, but always, the answer is that the model has been changed, reset the simulator, remove the store. I am also getting this error, however, this is a new app. I have not added/changed entities nor attributes. I’ve deleted the store, I’ve reset the simulator, but I get the […]

IB_DESIGNABLE, having views show in preview?

I have my views showing in interface builder with my IB_DESIGNABLE properties set, however when I use the preview feature to see how my views look on various devices, I just get the super view name, e.g. UIView. Don’t IB_DESIGNABLE views show in preview? EDIT As requested code + screen shot: H = #import <UIKit/UIKit.h> […]

What is the best way to store an array of objects with cocoa?

I have an NSMutableArray with many objects in it. Some are NSStrings, others are NSMutableArrays, others are NSNumbers. What is the best way to store this data so that the app could use it again? The array needs to stay in order as well. I’m thinking a plist or NSUserDefaults? Many thanks

Problems using MFMailComposeViewController

I’m trying to set it up so people can email from within my application. I’m referencing this post to do this, but I’m getting these warnings on the build: and then when I run it, it bugs: I’m wondering if I’ve simply placed the code in the wrong area. Just so you know I have […]

How to get iPhone SDK 2.2.1 for Xcode 3.2?

After my upgrade to Snow Leopard and Xcode 3.2 (which I really regret a lot!!), Xcode lost all the SDK’s. I’m one of those old-fashioned idiots who still want to develop for 2.2.1. But Apple does not offer me an old SDK download. Now I was clever and made tons of time machine backups. But: […]