objective-c

Special Characters from SQLite DB

Hi, I read from a sqlite db to my iphone app. Within the texts sometimes there are special characters like 'xf2' or 'xe0' as I can see in the debugger in the char* data type. When I try to transform the chars to an NSString Object by using initWithUTF8String, I get a nil back. How can I transform such special characters? Thanks for you...

popViewControllerAnimated not working, but back button works

Hi, I am creating an application based on the Utility template. The main screen consists of a menu with several buttons, each of which creates a different flip-side view. In one of those flip-side views I also configured a Navigation Controller, which works perfectly as long as I have the NavigationBar activated... I can push the view b...

How to add information to about screen of my cocoa app in Mac Os X

Hi All, I am pretty new in developing cocoa applications. I have developed a small UI application using cocoa. I wanted to add some information on about screen, currently it shows the app name and version which is 1.00. Can any one help me how i can add some information in about screen, is it possible to add information programmatically ...

iphone fbconnect. does it work with OS 2.2.1 ?

Hi, does fbconnect works with iphone OS 2.2.1 ? ...

Implementing scroll view that is much larger than the screen view with random images

What I'm trying to do is to implement something like the fruit machine scroll view. Basically I have a sequence of images (randomly generated on the fly) and I want to allow the users to scroll through this line. There can fit approx 10 images on the screen, but the line is virtually unlimited. My question is what would be the best appr...

How can UISearchDisplayController autorelease cause crash in a different view controller?

Hi, I have two view controllers A and B. From A, I navigate to view controller B as follows: // in View Controller A // navigateToB method -(void) navigateToB { BViewController *bViewController = [[BViewController alloc] initWithNibName: @"BView" bundle:nil]; bViewController.bProperty1 = SOME_STRING_CONSTANT; bViewController.title...

Why can't I make my parameter like this?

- (void)setPropertyValue:(const *void)inValue forID:(UInt32)propertyID { } The compiler doesn't like the const *void, for some reason. When I have that, it says: error: expected ')' before 'void' When I make the parameter like (UInt32)foo there is no problem. Does const *void only work in functions? I need a parameter which can ...

Beginning 3.2+ iPhone development

I'm interested in learning Objective C for iPhone development. This is a topic which I realize has been covered to death. The qualifying difference is: I'd like to start learning beginning with the latest version (the most recent iPhone OS as of May, 2010 is ver. 3.2 and 4 beta is also out). I'd like to not have to wade through or unlear...

iphone device orientation

During inAppPurchase, the storeKit will ask the username and password even though i set... [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight]; It ask Username and password in Portrait Mode... In general How to solve this kind of issue. UPDATED : But the InAppPurchase message on successfu...

Core data fetch only returns unique managed objects

I execute a core data fetch which specifies a predicate as follows: NSPredicate *predicate = [NSPredicate predicateWithFormat:@"identifier IN %@", favoritesIDs]; When there are duplicate items in the favoriteIDs array, the fetch request only returns 1 managed object. How can I ensure that more than one instance is fetched? Thank you. ...

iPhone: static method vs. sharedManager in Objective-C

I have a bunch of functions which returns commonly used UIViews in my application, e.g. + (UIView *) getLikeRow:(CGRect) frame ofType:(LikeType) type So far I've been using static methods for that, but recently I also noticed the sharedManager concept. Now I'm wondering if I should rather use a sharedManager for that. What are the di...

iPhone: Speeding up a search that's polling 17,000 Core Data objects

I have a class that conforms to UISearchDisplayDelegate and contains a UISearchBar. This view is responsible for allowing the user to poll a store of about 17,000 objects that are currently managed by Core Data. Everytime the user types in a character, I created an instance of a SearchOperation (subclasses NSOperation) that queries Core ...

Which Ipod touch generation should I buy? 2nd or 3rd?

I want to create games for Iphone/Ipod touch. Unfortunately I don't have a lot of money so I can buy only one device. Ipod is cheaper than Iphone, so I decided to bought Ipod touch. But I am afraid of buying 3rd generation - because it has more memory, more faster CPU, etc. And I think if I post my app on appstore - people with 2nd gener...

How to call method inside class

How do I call setStatus from within awakeFromNib? -(void)awakeFromNib { setStatus; // how? } /* Function for setting window status */ - (void)setStatus { [statusField setStringValue:@"Idle"]; } ...

What's wrong with my self-defined init method?

In ClassA: - (ClassA *)initWithID:(NSString *) cID andTitle:(NSString *) cTitle { ClassAID = cID; ClassATitle = cTitle; return self; } In ClassB: - (void)cellDidSelected { ClassA *classAController = [[ClassA alloc] init]; //Program received signal: “EXC_BAD_ACCESS” when executing the following line. classAControll...

Why I can't update my UIImageView?

I make my own UIImageView, like this: @interface MyImageView : UIImageView{ } And I have the initWithFrame like this: - (id)initWithFrame{ if( ( self = [ super initWithFrame: CGRectMake(0, 0, 175, 175) ] ) ) { UIImage *img = [UIImage imageWithContentsOfFile: [[NSBundle mainBundle] pathForResource:@"myImage" ofType:@"png"]]...

iPhone SDK: How to generate a random time of day

Hello all, I am having some problems trying to figure out the best way of generating a random time of day. For instance, if I want to choose a random time between the hours of 9am and 5pm, what would be the best way with the least amount of overhead on the device? I guess I need someone to point me in the right direction. Thanks! ...

How to change DNS settings in iPhone

Hello, I want to develop an application for iPhone. I have developed some apps before. I need to change DNS settings. Is it possible and how can I do and if it's possible, is it applicable only to wi-fi ? I want to change it for wi-fi and 3G, EDGE, etc. Thanks. ...

Moving UIButton around

I've tried to move a UIButton up and down in a menu. The problem I've got with the following solution is that the timer is not accurate. Sometimes the Button is moved up 122px, sometimes only 120px. How I can fix this? -(IBAction)marketTabClicked:(id)sender { if (marketTabExtended) { NSLog(@"marketTabExtended = YES"); ...

iPhone JSON object releasing itself?

I'm using the JSON Framework addon for iPhone's Objective-C to catch a JSON object that's an array of Dictionary-style objects via HTTP. Here's my connectionDidFinishLoading function: - (void)connectionDidFinishLoading:(NSURLConnection *)connection { [connection release]; NSString *responseString = [[NSString alloc] initWithData:res...