objective-c

How to get a "first time open"-view for my app?

Hello, I'm trying to find a way that my program will show up a "setup"-view, when you first start the app, but it doens´t works. Here is my attempt. The appdelegate should look, if the program opens the first time (abfrage = false) and open an other view. #import "TweetButtonAppDelegate.h" #import "TweetButtonViewController.h" #import...

Data Persistance in iPhone Applications

In the development of my first serious iPhone application (Meaning I'd like to actually get it out on the AppStore), I needed a good way to represent my data. Instead of going with core data, I (stupidly, I think) decided to use classes to represent my data. I created three classes, MMDot, MMShowMovement, and MMShow. The MMShowMovement ...

xcode global variables

hi experts, how to get xcode variables result from one view controller to another view controller, actually in one view controller i called web services to get userID which is declare as NSString, and in another view controller i want to display the userID which is retrieve from previous view controller, so how this can be done thanks ...

Load an other View from applicationDidFinishLaunching in the AppDelegate

Hello, I have this code in my applicationDidFinishLaunching in the AppDelegate: - (void)applicationDidFinishLaunching:(UIApplication *)application { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSString *firsttime = [defaults stringForKey:@"firsttime"]; if (firsttime == nil) { BenutzerdatenViewCon...

Can't figure out 'warning: incompatible Objective-C types'

I have a subclass of NSObject that implements an -(id)initWithRootElement:(MyElement *)e method. NSXMLDocument has an identical method that takes an NSXMLElement. When I compile, I get the following warning: warning: incompatible Objective-C types 'struct MyElement *', expected 'struct NSXMLElement *' when passing argument 1 of 'initW...

How to get a counter of an UITextView?

Hello, I want a counter that shows in a UILabel how many charachters the UITextView has. I tried this: IBOutlet UITextView *twittermessage; UIActionSheet * loadingActionSheet; IBOutlet UILabel * anzahl; Here the .m: - (void)textViewDidChange:(UITextView *)twittermessage{ int count = [twittermessage.text length]; anzahl.text...

Using regexlite to parse <a href src="">Links</a> out of a NSString

Hello, I am writing an iPhone app that has to pull raw HTML data off a website an grab the url of the links and the displayed text of a link. For example in the like <a href="www.google.com">Click here to go to google</a> It would pull grab url = www.google.com text = Click Here to go to google I'm using the regexlite library but i...

How my app save and open photos from the iPhone's photo library?

How can I save and open photos from the iPhone's photo library from my app? Code would be helpful. ...

presentModalViewController in viewDidLoad on first launch

I've been searching around but unfortunately have had no luck. My app requires the user to sign in/sign up the first time he or she launches the app. I know how to determine first launch (using NSUserDefaults) but whenever I try to present the modal containing the sign in/ sign up controls, nothing happens. Here's what I have: -(void)...

View under the statusbar and a 20px white space

Hello, I don´t know what I did, but just recently the hole view is displaced 20px to the top. The effect is, that my UIToolbar is under the statusbar and at the button is a white space. I set the statusbar in the plist to not hidden. But my second view, which is loaded by pressing a button will be displayed properly. Any idea? Thanks fo...

how to change the background color ,font ,size of the app from single controller to all controller objective-c

i want to change the background color, font, size of the application from same app. from single controller i want to change the appearance of all viewcontroller. ...

how to change the background color of the viewController in objective-c

how to change the backgrond color of view controller from other controller in the app ? ...

iPhone orientation problem

Hello guys! Down there is my code which is called when the iPhone is rotated. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { switch (interfaceOrientation) { case UIInterfaceOrientationPortrait: // some action return YES; case UIInterfaceOrientationLandsc...

Move an object from point A to point B

Hi everyone I just developed a game using Cocos2D,it is so easy to move an object on the screen using Cocos such as MoveTo. But what about in Cocoa? How can I make an object move from point A to point B easily? Could anyone help? I really appreciate any helps. This is the code i used to make an object move in Cocos. How can I convert th...

Lvalue required as left operand of assignment

Hello I get the "Lvalue required as left operand of assignment" error in xcode. Why? Here is my code (window1/2 are UIViewController) : - (void)loadView { UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0,0,320,460)]; UIView *contentView = [[UIView alloc] initWithFrame:CGRectMake(0,0,640,460)]; s...

Is there any Graphic tool to Localize strings in Objective-C?

I think the title says it all: genstrings is a mess, diffstrings from facebook is a bit better but still. I can't find a great tool to localize iPhone Objective-C programs! Any ideas? Thx a lot and Happy New Year! ...

Making best use of Objective-C dynamic features

I have been using Objective-C for a little while but being from a static type background (C#) I think I am using it in a very static way. Declaring objects as id feels alien to me and I can't see what the benefits are. Can anyone shine a light for me to get a better understanding of this? ...

iPhone code - CGPoint assign problem

hi, i tried to implement this code that move UIImageView's objects, i get a compiler warning for the objects (jumpBall1...) in the createPosition method: UIImageView may not respont to -setupperLimit, -setlowerLimit, -setspeed code: @interface JumpBallClass : UIViewController { CGPoint center; CGPoint speed; CGPoint lowerL...

Performing Method on background thread with NSNotification

I am trying to perform an operation on a background thread. In the past i have used [self performSelectorInBackground: @selector (getSetDisplay) withObject: nil]; to accomplish this. However, I have registered for this function to be executed within an NSNotification and I need to animate the UIActivityIndicator. The UIActivityIndic...

Problem: Can´t pass a NSUInteger from one ViewController to the other anymore

Hello, I want pass a number from my ViewController to the the TweetViewController. Everything worked okay, I did it with NSUInteger as property (randomNumber and tweetNumber): TweetViewController *Second = [[TweetViewController alloc] initWithNibName:nil bundle:nil]; Second.tweetNumber = randomNumber; Second.modalTransitionStyle...