June 2011
Intermediate to advanced
590 pages
19h 31m
English
This application will use the accelerometer data to offset the center of drawing in the HypnosisView. So, HypnosisView needs two properties to define the offset. In HypnosisView.h, add these properties.
@interface HypnosisView : UIView
{
float xShift, yShift;
}
@property (nonatomic, assign) float xShift;
@property (nonatomic, assign) float yShift;
@end
Now synthesize these properties in HypnosisView.m:
@implementation HypnosisView @synthesize xShift, yShift;
HypnosisView needs to know how to use these properties ...
Read now
Unlock full access