NSColor* 変数 = [《UILabel》 shadowColor];
[《UILabel》 setShadowColor:《NSColor*》];
CGSize 変数 = [《UILabel》 shadowOffset];
[《UILabel》 setShadowOffset:《CGSize》];
※リストが表示されない場合
AddBlockなどの広告ブロックツールがONになっているとリストなどが表示されない場合があります。これらのツールをOFFにしてみてください。
※MyIAppViewController.h #import <UIKit/UIKit.h> @interface MyIAppViewController : UIViewController { UILabel * label1; UIButton * button1; } @property (nonatomic, retain) IBOutlet UILabel * label1; @property (nonatomic, retain) IBOutlet UIButton * button1; - (IBAction)button1Action:(id)sender; @end ※MyIAppViewController.m #import "MyIAppViewController.h" @implementation MyIAppViewController @dynamic label1; @dynamic button1; - (IBAction)button1Action:(id)sender { [label1 setShadowColor:[UIColor redColor]]; [self startTimer]; } - (void)startTimer { NSMethodSignature* signature = [self methodSignatureForSelector: @selector(doTimer)]; NSInvocation* invocation = [NSInvocation invocationWithMethodSignature:signature]; [invocation setTarget:self]; [invocation setSelector:@selector(doTimer)]; id t = [NSTimer scheduledTimerWithTimeInterval:0.1 invocation:invocation repeats:YES]; } - (void)doTimer { NSLog(@"doTimer"); CGSize s = [label1 shadowOffset]; CGFloat w = s.width; w = w > 30 ? -30 : w + 1; [label1 setShadowOffset:CGSizeMake(w, 10)]; } ……中略…… @end
<< 前へ |