objective-c

Is there any different between these two dealloc method?

First one: - (void)dealloc { [super dealloc]; [AboutButton release]; } Second one: - (void)dealloc { [AboutButton release]; [super dealloc]; } Both methods are delloc, first run the super first, the other run it later, which one is correct or there is no diff between two. thz. ...

UIView animations: the "beginAnimations:context" method

Hey there, I'm doing a lot of animations in my app, and I was wondering whether passing nil as the context parameter to [UIView beginAnimations:context] is ok to do. When would I want to pass anything in as the context param and why? ...

Parse ISO8601 date in Objective-C (iPhone OS SDK)

How do I parse "2010-04-30T00:45:48.711127" into an NSDate? (and maintain all precision) ...

UIBarButtonItem: target-action not working?

Hey fellas, I've got a custom view inside of a UIBarButtonItem, set by calling -initWithCustomView. OK, so the view renders fine, but when I tap it, it doesn't call the method that I set as the UIBarButtonItem's action property. Oh, and I have verified that my -deselectAll method works fine. Keep in mind that I am not using Interface...

Setting UITableViewCell button image values during scrolling

I am having an issue where I am trying to save whether a repeat image will show selected or not (it is created as a UIButton on a UITableViewCell created in IB). The issue is that since the cell gets re-used randomly, the image gets reset or set somewhere else after you start scrolling. I've looked all over and the advice was to setup ...

How can I sort an NSTableColumn of NSStrings ignoring "The " and "A "?

I've got a simple Core Data application that I'm working on to display my movie collection. I'm using an NSTableView, with it's columns bound to attributes of my Core Data store through an NSArrayController object. At this point the columns sort fine(for numeric values) when the column headers are clicked on. The issue I'm having is...

How can I change the background image view transparency image?

It is the code: self.view.backgroundColor= [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"yourimage.png"]]; My "yourimage.png" have some space that is transparency. But it shows me it becomes black. How can I change it to show the transparency instead of black color? thz. ...

Build an Xcode project on a Linux machine

Without writing a GNUmakefile by hand, do any tools exist that understand Xcode projects and can build them directly against GNUstep, producing a Linux executable, thus simplifying (slightly) the work required to keep projects functional under Cocoa/Mac and GNUstep/Linux? Basically, is there an xcodebuild style app for Linux? I looked ...

Crashing the OS X Pasteboard

I have an application that reads in text by emulating CMD-C copy commands and reading the pasteboard - unfortunately this the only way to achieve what I need. Occasionally, as this is under development, once in a while I do something wrong (I don't think it's related to the copy command) and the app crashes. Once in a while, this has a...

Why I can't see the background image in the device, but appears on the simulator?

Here is the viewDidLoad: [self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"bg.png"]]]; It can show the simulator, but not on the device, why?? thz. ...

touchesBegan @ multitask

Is it possible to access to the touchesBegan event while application is running in background in iPhoneOS 4.0 ? Thanks in advance. ...

Using plist to populate a grouped table

Hi there, I was wanting to use a plist to populate my grouped table. I've had a look at the DrillDownSave sample project, and I'm still none-the-wiser. Although, I did learn that I could store hierarchies and suchlike in there. So here's the questions: How can I use my plist to add new items to my grouped table? I'm currently feeding...

UITableViewCell checkmark change on select

Am I correct in thinking that to change the checkmark for "on" to "off", I must change the CellAccessoryType between none and checkmark on the didSelectRowAtIndexPath? Because I have done this but I have noticed the behaviour is not perfectly identical to like the checkmark cells on the auto lock settings on the iphone. Or is there som...

Trouble using xib files in libraries

Hi there, I'm having some trouble working with libraries and included xib files. Let me explain my situation first. I've got a project that's running pretty good. Now I need a part of my project as a library for another customer who want's to use some of the functionality in his app. I've created a library with help of that highly recom...

How to programmatically change iPhone settings

Hello, It is possible to change iPhone settings from an application? I want to change settings like enable/disable WIFI, enable/disable vibrations, change ring tone, enable/disable bluetooth, call forwarding, mail accounts, etc. I want to be able to change all settings programmatically. I would appreciate some sample code. Thanks for ...

How does Core Data determine if an NSObjects data can be dropped?

In the app I am working on now I was storing about 500 images in Core Data. I have since pulled those images out and store them in the file system now, but in the process I found that the app would crash on the device if I had an array of 500 objects with image data in them. An array with 500 object ids with the image data in those objec...

Can I change an NSDictionaries key?

I have an NSDictionary object that is populated by NSMutableStrings for its keys and objects. I have been able to change the key by changing the original NSMutableString with the setString: method. They key however remains the same regardless of the contents of the string used to set the key initially. My question is, is the key protect...

Is the Keychain suitable for storing general data, such as strings?

The Keychain seems to be used a lot for usernames and passwords, but is it a good idea to use it for other sensitive stuff (bank details, ID numbers etc), but with no password? What kind of encryption does the keychain use? The scenario I'm concerned about is a thief acquiring an iPhone (which is screen-locked) and being able to access t...

Performing a task immediately when an app starts

I know there is an NSSomething() that is called automatically if it exists when the app starts and can be used to set for example the text of a label. I just can remember the name of that function. help? Thanks! ...

iPhone slide view passing variables

Right, I'm trying to make an app that has a calculation that involves a stopwatch. When a button on the calculation view is clicked a stopwatch slides in from the bottom. This all works fine, the problem I can't get my head around is how to send the recorded time back to the previous controller to update a textfield. I've simplified the...