UIFont * 変数 = [UIFont fontWithName:《NSString*》 size:《CGFloat》];
@property(nonatomic, readonly, retain) NSString *fontName
@property(nonatomic, readonly, retain) NSString *familyName
@property(nonatomic, readonly) CGFloat pointSize
※リストが表示されない場合
AddBlockなどの広告ブロックツールがONになっているとリストなどが表示されない場合があります。これらのツールをOFFにしてみてください。
※MyIAppController.h
#import <UIKit/UIKit.h>
@interface MyIAppViewController : UIViewController {
UILabel * label1;
UITextField * field1;
UIButton * button1;
}
@property (nonatomic, retain) IBOutlet UILabel * label1;
@property (nonatomic, retain) IBOutlet
UITextField * field1;
@property (nonatomic, retain) IBOutlet
UIButton * button1;
- (IBAction)button1Action:(id)sender;
@end
※MyIAppController.m
#import "MyIAppViewController.h"
@implementation MyIAppViewController
@dynamic label1;
@dynamic field1;
@dynamic button1;
- (IBAction)button1Action:(id)sender {
NSString * str = [field1 text];
CGFloat size = [str floatValue];
UIFont * font = [label1 font];
UIFont * newfont = [UIFont fontWithName:
[font fontName] size:size];
[label1 setFont:newfont];
}
……中略……
@end
| 次へ >> |