私はiOS開発の初心者ですが、
アプリに線を引きたいのですが、シンプルなビューベースのアプリケーションを作成しました。
線を引くにはメソッドが必要だということを知りました- (void)drawRect:(CGRect)rect
が、このメソッドUIView
は
UIViewCOntroller
クラスをに変更するにはどうすればよいUIView
ですか?
これが私のコードスニペットです、
// .h file
@interface Financial_Calc : UIViewController{
UIButton *firstBtn,*secondBtn;
}
@end
//.m file
@implementation Financial_CalculatorViewController
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidLoad
{
[super viewDidLoad];
}
- (void)drawRect:(CGRect)rect {
NSLog(@"drawRect");
}
@end
どんな助けでもありがたいです