// Create scroll view(in viewDidLoad)
UIScrollView *scrollViewTemp=[[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
scrollViewTemp.backgroundColor=[UIColor colorWithWhite:1.0f alpha:0.0f];
self.scrollView=scrollViewTemp;
[self.view addSubview:self.scrollView];
[scrollViewTemp release];
// Create your controls here and add them to the scrollView(with addSubview)
// Set the scrolling height
self.scrollView.contentSize=CGSizeMake(320,HEIGHT);
thanks for the input svinja. I tried using your code.
self.scrollView=scrollViewTemp;
But i am getting error 'scrollview is some thing not a structure or union'.
Any Inputs/Suggestions Please!
scrollView is a property,
If you have self. in front of the word, it means it is a property(something like global variable)
And one suggestion since i see you are begginer, stay away from interface builder, create your controls in code...just my opinion
i didnt write anywhere that property=global variable!!, i wrote "something like global variable" because i was trying to explain to him with something familiar since it is obvious he is beginner, but thanks for correcting meugh!! property != global variable!! property = field in object to store data/reference.
Everyone has an opinion, you cant say for opinion that is wrong, of course, every begginer should read some books but IB surely didnt help me in the beggining, nobody in my office uses IB anymore, too much time for nothing..ugh!! WRONG! As a beginner you should read one (or better more) books on Cocoa and iPhone dev. and/or have a look at the examples from Apple. And you should read about how the IB works before using it... but you should not avoid it!! (my opinion!)
i didnt write anywhere that property=global variable!!, i wrote "something like global variable" because i was trying to explain to him with something familiar since it is obvious he is beginner, but thanks for correcting me![]()
Everyone has an opinion, you cant say for opinion that is wrong, of course, every begginer should read some books but IB surely didnt help me in the beggining, nobody in my office uses IB anymore, too much time for nothing..