¡@

Home 

2014/10/15 ¤U¤È 10:05:32

iphone Programming Glossary: controller.h

error: expected specifier-qualifier-list before…in Objective C?

http://stackoverflow.com/questions/1246509/error-expected-specifier-qualifier-list-before-in-objective-c

specifier qualifier list before&hellip in Objective C Whenever I build the following code I get the error above. Controller.h #import UIKit UIKit.h #import Foundation Foundation.h #import PolygonShape.h #import PolygonView.h @interface Controller.. shape IBOutlet PolygonView shapeView IBAction decrease IBAction increase void awakeFromNib @end Controller.m #import Controller.h @implementation Controller @end However when I replace the import statement and put a forward class reference instead the.. @end However when I replace the import statement and put a forward class reference instead the code compiles. Controller.h #import UIKit UIKit.h #import Foundation Foundation.h #import PolygonShape.h @class PolygonView @interface Controller NSObject..

Making an array of Objects in Objective-C.

http://stackoverflow.com/questions/3646787/making-an-array-of-objects-in-objective-c

i want to do is create an array of 40 'Person' objects. But i don't know the correct way to put that in code in Obj C. Controller.h #import Foundation Foundation.h @class Person @interface Controller NSObject Person person @property nonatomic retain Person.. Controller NSObject Person person @property nonatomic retain Person person void doSomeWork @end Controller.m #import Controller.h #import Person.h @implementation Controller @synthesize person IBAction doSomeWork I guess here is where i should create..

Connect a UILabel in Interface Builder and XCode?

http://stackoverflow.com/questions/3826906/connect-a-uilabel-in-interface-builder-and-xcode

I find online are for older versions of IB so the directions aren't correct. I have a label on my .xib file in my Controller.h file I have an IBOutlet UILabel declared with a Property set up. In my Controller.m file I synthesized that Property. In.. is the same as the name of your class. Save and close Interface Builder and then go into Xcode and verify ExampleViewController.h #import UIKit UIKit.h @class ExampleViewController @interface ExampleViewController UIViewController IBOutlet UILabel label.. @property retain nonatomic IBOutlet UILabel label @end In your .m file ExampleViewController.m #import ExampleViewController.h @implementation ExampleViewController @synthesize label Then save the xcode files and open up your ExampleView. Drag a label..