objective-c

UIProgressBar loading NSMutableDictionary

I'm my program i'm loading a fairly large MutableDictionray and I would like to use a UIProgressBar. Does anyone have a suggestion of how to determine the loading time to make this work? Thanks ...

Prompting and Delegate question

I have a class that needs to ask the user a question and wait for the users response to determine the next action. What would be the best way to do this? Using a delegate? How? I have a UITextField and a UITextField in the class. Thanks ...

Custom UITableView section header views are breaking

I have a custom UIView subclass that i'm trying to use as a header for one of my grouped tableview sections. I save an instance of that view in the tableViewController and use that to return the height for the header section as well as the view itself. the problem is that somehow that instance variable changes from a UIView to a CALaye...

Building iPhone SDK 2.x targets with Base SDK 3.0, when linking static libraries created with SDK 3.0

I'm having a problem getting Pinch Analytics r64, a static library built with iPhone SDK 3.0, to link properly in my application which is targetting iPhone OS 2.0. This seems to be a fairly common problem, and Pinch Analytics' site even has an entire page devoted to answering this question. Basically, they say to set your project's B...

Results for performSelector: differ from standard dot notation call?

I was very puzzled by some unexpected compile errors in my code recently. I did some troubleshooting, and I came up with this bit of test code: 1 float performSelectorResult, messageResult; 2 SEL selector = @selector(smallContentCellMargin); 3 4 NSLog (@"selector %s result %f", selector, [defaults performSelector:selector]); 5 NSLog (@...

UIActivityIndicatorView start/stop before & after web-page request

Hi, I'm using objective-c & the iphone 3.0 sdk I want to retrieve the contents of a URL (web page or pdf) and display it within a UIWebView it seems that the thing to do is something like this: NSURLRequest *requestObject = [NSURLRequest requestWithURL:myURL]; [myUIWebView loadRequest:requestObject]; this works quite well, except f...

is it necessary to nil an assigned variable?

In some code I sometimes see this: @property (nonatomic, assign) NSObject *foo; ... -(void)dealloc { self.foo = nil; ... } Is it really necessary to nil an object when it hasn't been retained? Won't this actually cause problems? ...

Custom View in UITableViewCell

I am trying to create a UITableView Section that contains two buttons aligned horizontally. This would be similar to the Contacts app, where on the bottom of a specific contact page they have buttons lined up to Text the contact and share the contact. However in my tableView, I want the two buttons to be placed in between other section...

Is C hard to learn if you know Objective-C

I'm in the process of teaching myself Objective-C via Stephen Kochan's "Programing In Objective-C 2.0" It's a great book and currently reading it for the second time, first time I got the gist of it and now it's really starting to sink in the second time. If you have a moderate (about) knowledge of Objective-C, how difficult would it b...

How can I make unicode characters from integers?

I want to make an array of Unicode characters, but I don't know how to convert integers into a Unicode representation. Here's the code I have so far NSMutableArray *uniArray = [[NSMutableArray alloc] initWithCapacity:0]; int i; for (i = 32; i < 300; i++) { NSString *uniString = [NSString stringWithFormat:@"\u%04X", i]; [uniArray addO...

How do I create a MenuItemImage with some text on it ?

Hey Guys, I would like to create a menu item from an image with some text on it. Image is a button and I have to write the name of the player on the button, so I presume I have to use both MenuItemImage and MenuItemFont. Maybe I can create an AtlasSprite using both image and text on it and then us MenuItemAtlasSprite object? If so how ...

Trying to grab integer from pre-defined p-list? ObjC/Cocoa

Hello, I'm working on an Objective-C/Cocoa roguelike, because I've always found that working on a game is the best way to learn about a language. I've gotten quite far with my game, but I'm having a problem. Each level.plist is defined with a few things, like so: <key>Save Location</key> <integer>0</integer> It's grabbed like so, I'...

How to add a breakpoint to objc_exception_throw?

this was the answer from the brad larson on this SO question If you add two breakpoints, you should be able to debug these exceptions. To do this, go to Run | Show | Breakpoints and create two global breakpoints (I do them globally because they are so useful in all my applications). The first should be named "objc_exception_throw" and i...

RSSI value in gamekit iphone api

Is it possible to get bluetooth RSSI (Radio signal strength) value in gamekit iphone api? If it is pssobile, can i have some sample code. If it is not possible is there any other way to get bluetooth RSSI value in iphone OS 3.0? ...

Automatic Tab Switch

Hi all, I'm building an iPhone application with a UITableView. On selecting a row a web page is loaded in a UIWebView in the next tab along. Currently this is all working, however, how can I set the application to automatically move into the tab where the webpage has been loaded into the UIWebView? Is there some form of animation that ...

Coredata on iPhone, setFetchBatchSize & setPropertiesToFetch in one Request

Hi, I'm writing a coredata based iPhone app that displays recipes. To improve performance, when displaying them in a TableView, I want to enable batching (-setFetchBatchSize:) and fetching only the "name" attribute (-setPropertiesToFetch:). When I turn on both, it doesn't work and the list is empty. As soon as I comment out one of the l...

Displaying image on Scroll View

Hi every one, I am developing an iPhone application where i want to display three image in each row on scroll view where i need to click action on each image like Photo album in iPhone. I am not getting any sample code. Hoping for help subodh ...

Can't get landscape bounds for modal UIViewController

Hi, I have a landscape view which is activated via listening for orientation notifications and then presenting a modal view controller. However, it's giving me some grief. It seems whatever I do I just can't seem to get landscape bounds. super.view.bounds is {{0, 0}, {320, 480}} portrait, even though it is drawing at the correct orien...

how to update uitextview from another uiviewcontroller

I want to update UITextView from another uiviewcontroller classes... Its a big issue in my code.. I can able to pass the text from oneviewcontroller classes into another viewcontroller classes.But i cant update another textview property from this uiviewcontroller classes... Can anyone help me? I searched lot ..But never get clear ideas...

UIActivityIndicatorView animation

i have a tableview controller, when i select a row its pushing another view controller. In that view controller 's loadView i have to request a url. it will take 5 or 10 secs to complete the request. i have to show UIActivityIndicatorView for that delay . I have a UIActivityIndicatorView in my table view didSelectRowAtIndexPath and I...