MaysamSh

Untitled

Feb 21st, 2013
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .m
  2. #import "Constant.h"
  3.  
  4. @implementation Constant
  5.  
  6. @synthesize fontSize,font;
  7. @synthesize fontName,textViewLimitedCharNumber;
  8.  
  9. -(id)init {
  10.    
  11.     self.fontSize = 40;
  12.     //self.fontName = @"freestyle script";
  13.     self.fontName = @"snellroundhand script";
  14.     self.font = [UIFont fontWithName:[self fontName] size:[self fontSize]];
  15.     self.textViewLimitedCharNumber = 45;
  16.     return self;
  17. }
  18.  
  19. @end
  20.  
  21. -----
  22. .h
  23. #import <Foundation/Foundation.h>
  24.  
  25. @interface Constant : NSObject
  26.  
  27.  
  28. @property (nonatomic) int fontSize;
  29. @property (nonatomic) int textViewLimitedCharNumber;
  30. @property (nonatomic) NSString *fontName;
  31. @property (nonatomic) UIFont *font;
  32.  
  33. @end
  34.  
  35. -----
  36. using
  37. Constant *appConstant = [[Constant alloc]init];
  38.     mytextview.font = appConstant.font;
Advertisement
Add Comment
Please, Sign In to add comment