Tag: iphone

UIImage Rotation custom degrees

I have been using the code in this sample to assist and this works well. http://www.platinumball.net/blog/2009/03/30/iphone–uiimage-rotation-and-mirroring/ I cannot workout how to rotate by a custom amount of degrees between 0 & 360….

Hide/Show iPhone Camera Iris/Shutter animation

I am not able to Hide the iphone Camera shutter opening animation for my app. I am using UIImagePickerController to access iphone camera and using my own overlay controllers. Is there a way to remove the initial shutter(also known as Iris) animation as the camera starts. Thank You [EDIT] For those who wants to know […]

Get the width of a UIBarButtonItem

I’m trying to get the width of a UIBarButtonItem. This doesn’t work: barbuttonitem.customView.frame.size.width And this won’t work, either: barbuttonitem.width

How to search an NSSet or NSArray for an object which has an specific value for an specific property?

How to search an NSSet or NSArray for an object which has an specific value for an specific property? Example: I have an NSSet with 20 objects, and every object has an type property. I want to get the first object which has [theObject.type isEqualToString:@”standard”]. I remember that it was possible to use predicates somehow […]

self.window.rootViewController vs window addSubview

I’ve noticed a lot of examples for iPhone apps in the Application Delegate – (void)applicationDidFinishLaunching:(UIApplication *)application have [window addSubview: someController.view]; (1) as opposed to self.window.rootViewController = self.someController; (2) Is there any practical reason to use one over the other? Is one technically correct? Do controller’s have an equivalent command to number (2) like self.someController.rootController = […]

NSMutablearray move object from index to index

I have a UItableview with reordable rows and the data is in an NSarray. So how do I move an object in the NSMutablearray when the appropriate tableview delegate is called? Another way to ask this is how to reorder an NSMutableArray?

LibXML2.dylib and Xcode4

I just downloaded Xcode 4 and I cant seem to run my application as the MGTwitter… classes are complaining of a non inclusion error of LibXML2. I have imported it into the frameworks folder, and I have put the following in the header bit in the build settings $(SDKROOT)/usr/include/libxml2 But I am still getting 65 […]

NSString @property, using copy instead of retain

I’m looking over Apple’s sample application EditableDetailView, and noticed that in one of their controllers, they’re setting an instance of NSString property with (nonatomic, copy). When would one use copy instead of retain? Is this so they can make a unique copy without affecting the existing data?

Directly accessing nested dictionary values in Objective-C

Is there a way to directly access an inner-array of an an outer array in Objective-C? For example, a call to an external data source returns the following object: { bio = “this is the profile.bio data”; “first_name” = John; “last_name” = Doe; location = { name = “Any Town, Any State”; }; metadata = […]

Reporting incorrect bounds in landscape Mode

I am having an issue with Landscape mode in my iPad application. I created a very small new project to show my issue I set UIInterfaceOrientation in the pList to UIInterfaceOrientationLandscapeRight In app delegate – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [self.window makeKeyAndVisible]; MyController *myController = [[MyController alloc] init]; [self.window addSubview:myController.view]; return YES; } In MyController […]