むい空間
むいむい(´ω`*)
Entries
@interface MyButton : UIButton
@end
@implementation MyButton
- (id)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
NSLog(@"(´ω`*)");
}
return self;
}
@end
NSLog(@"%@", [[[MyButton alloc] init] autorelease]); NSLog(@"%@", [MyButton buttonWithType:UIButtonTypeCustom]); NSLog(@"%@", [MyButton buttonWithType:UIButtonTypeRoundedRect]); NSLog(@"%@", [MyButton buttonWithType:UIButtonTypeDetailDisclosure]); NSLog(@"%@", [MyButton buttonWithType:UIButtonTypeInfoLight]); NSLog(@"%@", [MyButton buttonWithType:UIButtonTypeInfoDark]); NSLog(@"%@", [MyButton buttonWithType:UIButtonTypeContactAdd]);
iPhone SDK 3.0 + Simulator 3.0 での実行ログ。
(´ω`*)
<MyButton: 0xd1aea0; baseClass = UIButton; frame = (0 0; 0 0); opaque = NO; layer = <CALayer: 0xd18f70>>
(´ω`*)
<MyButton: 0xd1d460; baseClass = UIButton; frame = (0 0; 0 0); opaque = NO; layer = <CALayer: 0xd1dcf0>>
<UIRoundedRectButton: 0xd1d920; frame = (0 0; 0 0); opaque = NO; layer = <CALayer: 0xd1d600>>
<UIButton: 0xd27c30; frame = (0 0; 29 31); opaque = NO; layer = <CALayer: 0xd19d60>>
<UIButton: 0xd28cd0; frame = (0 0; 18 19); opaque = NO; layer = <CALayer: 0xd28d50>>
<UIButton: 0xd29790; frame = (0 0; 18 19); opaque = NO; layer = <CALayer: 0xd295a0>>
<UIButton: 0xd29ca0; frame = (0 0; 29 29); opaque = NO; layer = <CALayer: 0xd29a40>>
buttonWithType: で MyButton のインスタンスが返されるのは引数が UIButtonTypeCustom の時だけか……
コメント
コメントの投稿
トラックバック
- トラックバック URL
- http://idlysphere.blog66.fc2.com/tb.php/207-d8484841
- この記事にトラックバックする(FC2ブログユーザー)