iPadçãã ãã¶ã§ãã¦ããããiPhoneã§åããªãã®ã§ãiPhoneç¨ããã¸ã§ã¯ãã«ã9VAeãçµã¿è¾¼ãã§è¦ããã¨ã«ããããã®æ¹æ³ãé çªã«æ¸ãã¦ããã
Â
ãã®ä½æ¥ã¯ãï¼åç®ã ãåã«ãã£ãä½æ¥ã¯ãã¡ãã
9VAeãã ãã¹ãiPadç CoreTextã使ã£ãæå表示ãã§ãã - dnjiroâs 9VAe blog
Â
QvaeLibã®å 容
QvaeLibã¯ãå®æãããGithubãªã©ã§ç¡æå ¬éããã¤ãããã¤ã¾ãã誰ã§ã iPhone/iPadç9VAeã¢ããªãä½ããããã«ãªãããã ããã®ã¨ãZIPãã¡ã¤ã«ã解åããã¨ãQvaeLibãã©ã«ãã®ä¸ã«æ¬¡ã®ãã¡ã¤ã«ãå ¥ã£ã¦ããã
 data
libqvaeLib.a
QvaeDef.h
QvaeLib.h
QvaeLib.mm
QvaeView.h
QvaeView.m
 ãããããã¸ã§ã¯ãã«è¿½å ãããdataãã©ã«ãã«ã¯ãµã³ãã«ã¢ãã¡ãªã©ãå ¥ã£ã¦ãããQvaeViewãã9VAeã®ã¨ãã£ã¿ç»é¢ã«ãªãã
Â
ãã¬ã¼ã ã¯ã¼ã¯ã®è¨å®
9VAeLibã«ã¯ä»¥ä¸ã®ãã¬ã¼ã ã¯ã¼ã¯ãå¿ è¦ãããã¸ã§ã¯ããé¸æãä¸å¤®ãã¤ã³ã®ä¸ã§ãï¼ããæ¼ãã¦è¿½å ããã
AssetsLibrary
AVfoundation
QuartzCore
CoreText
UIKit
Foundation
CoreGraphics
Â
ãããFrameworkã®é¢æ°ã§ãªã³ã¯ã¨ã©ã¼ãåºãããããã¸ã§ã¯ãè¨å®ã®ä¸ã® Frameworkã®ãµã¼ããã¹ã«å¤ãè¨å®ããã¦ããªãã調ã¹ãã¨è¯ããFrameworkã®ãµã¼ããã¹ãããã¸ã§ã¯ãå ã«ãªã£ã¦ãããåé¤ããã
Â
Privacyã®è¨å®
ããã¸ã§ã¯ã.plistãé¸æããå³ãã¿ã³ã§è¡ã追å ãã次ã®ãã©ã¤ãã·ã¼è¨å®ã追å ããã
Privacy - Photo Library Usage Description
Privacy - Media Library Usage Description
è¨å®ãããã¼ã¯ãã¦ã¼ã¶ã¼ã«è¨±å¯ãæ±ããæã®ã使ãéã®è¡¨ç¤ºã«ä½¿ãããã
Â
QvaeViewã StoryBoardã«å ¥ãã
ï¼ãå³ä¸ã®ãã¤ã³ããâããã¿ã³ãæ¼ãã¦ãªãã¸ã§ã¯ãã表示ããããã®ä¸ãããViewãããã©ãã°ãã¦ç®çã®å ´æã«ç½®ãã以ä¸ãåè
ã«ã¹ã¿ã Viewãxibã§ã¯ãªããstoryboardã§ãã¶ã¤ã³ãã - Qiita
ï¼ãå³ä¸ã®ãã¤ã³ã® ãIdentityããã¯ãªãã¯ããClassã®ãUIViewãã¨æ¸ããã¦ããé¨åãããQvaeViewãã«å¤æ´
ä¸ã® Accessibility ã¯ããimageããUser Interface Enabledãã«ãã§ãã¯
Document ã®ã©ãã«åãããqvaeViewãã«ãã
ï¼ãå³ä¸ã®ãConnectionsããã¯ãªãã¯ãReferencong Outlets ã®å³å´ã®ãâãããã©ãã°ããå·¦å´ã® View Controller ã¾ã§ãã©ãã°ãããããã¯ä»¥ä¸ã®ãViewController.m ã®åæåã®æã«ãç»é¢ãµã¤ãºãä¸ããããã®ãªã³ã¯ã
Â
ViewController.mã«QvaeViewãå ¥ãã
 ï¼ãã¡ã¤ã³ã®ViewController.h ã®é©å½ãªå ´æã«ä»¥ä¸ã®è¡ã追å ãã
#import "QvaeView.h"
Â
@property (nonatomic, weak) IBOutlet QvaeView *qvaeView;
@property (nonatomic, retain) NSTimer *qvaeTimer;Â
ï¼ãViewController.m ã®é©å½ãªå ´æã«ä»¥ä¸ã®è¡ã追å ãã
@synthesize qvaeView;
@synthesize qvaeTimer;
Â
-(void) update:(NSTimer *)timer
{
  [QvaeView updateView:self qvaeView:qvaeView];
}
 - (void)viewDidLoad ã®ä¸ã«ä»¥ä¸ã®åæåã¨ã¿ã¤ãã¼ã追å ãã
- (void)viewDidLoad {
  [super viewDidLoad];
  if(!qvaeView){
    qvaeView = [[QvaeView alloc] init];
  }
  Â
  Â
  [qvaeView setQvaeFrame:self.qvaeView.frame]; //ç»é¢ãµã¤ãºãä¸ãã¦åæå
  if(qvaeTimer==nil){ //ã¿ã¤ãã¼å¦ç
    qvaeTimer = [NSTimer
           scheduledTimerWithTimeInterval:0.2 //ã¿ã¤ãã¼ééï¼ç§ï¼
           target:self     //å®è¡ããå¦çã®æå±ï¼self=èªåï¼
           selector:@selector(update:) //å®è¡ããå¦çå
           userInfo:nil    //ã¦ã¼ã¶ã¼ãã©ã¡ã¼ã¿
           repeats:YES     //ç¹°ãè¿ããã©ãã
           ];
  }
}
Â
Â
Â
以ä¸ã®ä½æ¥ã§9VAeç»é¢ãæç»ãããããã«ãªãã
iPhoneçã¯ä»¥ä¸ã®ãããªæããç»é¢ãå°ããã®ã§ã¡ãã¥ã¼ãå¤ã«åºããããæ»ãããã§ããããã«ããã
Â
Â