단추가있는 UIViewController를 만듭니다. 버튼의 유일한 작업은 일부 직사각형을 그리는 창을 만드는 것입니다. (나는 애플의 예제 응용 프로그램에서 "QuartzDemo"에서 몇 가지 코드를 가져왔다.) 목표 C는 실제로 나에게 맞는 것을주고있다 ...pushViewController 문제
나는 이것을 시도해도 아무 일도 일어나지 않는다.
다음은 버튼에 대한 코드입니다 :
- (IBAction)startButtonAct:(id)sender
{
QuartzViewController *controller;
NSLog(@"1");
controller = [[QuartzViewController alloc] initWithTitle:@"Dotsie"];
controller.quartzViewDelegate = [[[RectDrawing alloc] init] autorelease];
[[self navigationController] pushViewController:controller animated:YES];
// [controller release];
}
솔직히 누구나 볼 필요 그 밖의 무엇을 잘 모르겠지만, 여기에 다른 물건의 일부입니다 :
@interface QuartzViewController : UIViewController
{
QuartzView *quartzView;
UIBarStyle barStyle;
UIStatusBarStyle statusStyle;
}
@protocol QuartzViewDelegate;
@interface QuartzView : UIView {
id<QuartzViewDelegate> delegate;
}
@property(assign) id<QuartzViewDelegate> delegate;
@end
@protocol QuartzViewDelegate<NSObject>
@required
// Draw contents into the given view, using the given context and bounds.
-(void)drawView:(QuartzView*)view inContext:(CGContextRef)context bounds:(CGRect)bounds;
@end
도와주세요 - 이것은 나를 미치게합니다. 저는 지금 같은 기본 문제로 일주일 동안 싸우고 있습니다. ...