Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .m
- #import "Constant.h"
- @implementation Constant
- @synthesize fontSize,font;
- @synthesize fontName,textViewLimitedCharNumber;
- -(id)init {
- self.fontSize = 40;
- //self.fontName = @"freestyle script";
- self.fontName = @"snellroundhand script";
- self.font = [UIFont fontWithName:[self fontName] size:[self fontSize]];
- self.textViewLimitedCharNumber = 45;
- return self;
- }
- @end
- -----
- .h
- #import <Foundation/Foundation.h>
- @interface Constant : NSObject
- @property (nonatomic) int fontSize;
- @property (nonatomic) int textViewLimitedCharNumber;
- @property (nonatomic) NSString *fontName;
- @property (nonatomic) UIFont *font;
- @end
- -----
- using
- Constant *appConstant = [[Constant alloc]init];
- mytextview.font = appConstant.font;
Advertisement
Add Comment
Please, Sign In to add comment