quartz graphics - iPhone: why isn't drawRect getting called? -


OK, I think I'm missing something important, and I can not find an answer. I am posting all the code because it is too small.

Anyone please tell me what I'm doing wrong? For example, I have worked on this for example, for some time, and I do not want to do anything.

When I make the app, then whatever skeleton gives me a UIViewController I put a scene on the controller I am creating the variable to add to the controller when I UIView my UIView in my UIView I try to connect, so the compiler is okay, but it also insists on connecting with "view", or the app crashes. I would not be surprised if this is the problem, but if it is, So i have to fix it Africa can not understand.

Here is the code:

DotsieAppDelegate H:

  #import & lt; UIKit / UIKit.h & gt; @ Class DotsieViewController; @ Interface dotsapadalelett: NSobect & lt; UIApplicationDelegate & gt; {UIWindow * window; DotsieViewController * viewController; } @ Property (Nonomatic, Retaining) IBOutlet UIWindow * Window; @protecti (nonatomic, retten) ibotellate dottv controller * view controller; @end  

DotsieAppDelegate.m

#import "DotsieAppDelegate.h" #import "DotsieViewController.h" @ Implementation DotsieAppDelegate @ Synthesis window; Modify the ViewController; - (blank) ApplicationDefinitional Launching: (UIApplication *) Application {// Override Point for optimization after app launch [Window Adsview: View controller: view]; [Window-making and knowledgeable]; } - (zero) DLock {[viewController release]; [Window release]; [Super DeLoc]; } @ And

DotsView Controller H

  #import & lt; UIKit / UIKit.h & gt; @ Interface DoDView Controller: UIViewController {UIView * dotsieView; } @ Property (Nonomatic, Rectangle) IBOutlet UIView * dotsieView; @end  

DotsieViewController.m

  #import "DotsieViewController.h" @Iplination DotsieViewController @Synthesize dotsieView; - (zero) draw: (CGRact) racket {NSLOG (@ "here"); CGRTact current = CGRactam (50,50,20,20); UIColor * currentColor = [UIColor redColor]; CGContextRef Reference = UIGraphicsGetCurrentContext (); CGContextSetLineWidth (Reference, 2.0); CGContextSetStrokeColorWithColor (reference, currentColor.C CGColor); CGContextSetFillColorWithColor (reference, currentColor.C CGColor); CGContextAddEllipseInRect (reference, current line); CGContextDrawPath (reference, KCGPathFilstroke); // [self.view settings display]; } // Override the required setup before the named initializer view is loaded. - (id) initWithNibName: (NSString *) nibNameOrNil bundle: (NSBundle *) nibBundleOrNil {if (self = [super initWithNibName: nibNameOrNil bundle: nibBundleOrNil]) {// Custom initialization} [self.view setNeedsDisplay]; Self return; } - (zero) did the Reciever Memory Warning {// See if there is no Supervisor then it releases [Super Dareceywamari Warning]; // Use any cached data, images, etc. which are not in use. } - (zero) viewDidUnload {// Release main view of any maintained subviews // eg. Self.myOutlet = Zero; } - (zero) Delok [[Super Delooc]]; } @end  

drawRect: UIVU is a method for subclasses. Try UIView subclass and change the type of UIView in InterfaceBuilder (see picture).


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -