ã¢ãã¤ã«ãã¡ã¼ã¹ã室㮠@slightair ã§ãã
å ã»ã©ããã¶ã¤ã³ããªãã¥ã¼ã¢ã«ããã¯ãã¯ãããiOSã¢ã㪠6.0.0 ããªãªã¼ã¹ãã¾ããã https://itunes.apple.com/jp/app/kukkupaddo-no.1reshipi-jian/id340368403?mt=8
ãã®è¨äºã§ã¯ãã©ã®ããã«ãã¦æ°ãããã¶ã¤ã³ãiOSã¢ããªã«é©ç¨ãã¦ãã£ãã®ããç´¹ä»ãããã¨æãã¾ãã
æ°ããã¢ããªã®ç»é¢
ã¹ã¯ãªã¼ã³ã·ã§ãããè¦ã¦ããã ããã°ãããããã«ãå ¨ä½çã«ãã©ãããªå°è±¡ãä¸ããç»é¢ã«å¤ããã¾ããã
ããã
ã¬ã·ã詳細ç»é¢
ãµã¤ãã¡ãã¥ã¼
ãã®è¨äºã§å ¨ã¦ã®ç»é¢ãç´¹ä»ãããã¨ã¯ã§ãã¾ãããããã²ãã¦ã³ãã¼ããã¦ãææã¡ã®iOS端æ«ã§è§¦ã£ã¦ã¿ã¦ãã ããã
æ°ãã¶ã¤ã³ã®é©ç¨
åºæ¬çã«ã¯ãç»é¢ãã¶ã¤ã³æ¡ãããããæ¢åã®ã¢ããªãä¿®æ£ãã¦å°ããã¤é©ç¨ãã¦ããå½¢ã§é²ãã¦ããã¾ããã GitHub Enterpriseãå©ç¨ãã¦ããã®ã§ä¿®æ£ç¹ãã¨ã«issueãä½ãããã¶ã¤ã³é©ç¨ã確èªã調æ´ãç¹°ãè¿ãã¦é²ã¿ã¾ããã ãã«ãªã¯ã¨ã¹ãããã¼ã¸ãããã³ã«ããã¶ã¤ã³ã®è²¬ä»»è ãTestFlightçµç±ã§æ°ããã¢ããªãã¤ã³ã¹ãã¼ã«ãã¦è©¦ããåé¡ããªããªãã°issueãã¯ãã¼ãºãã¦ããã¾ãã æ°ããåé¡ãè¦ã¤ããã°ããããã©ãã©ãissueã«è¿½å ãã¦ãã£ãã®ã§ãç»é¢ãªãã¥ã¼ã¢ã«ã®ä½æ¥ä¸ã¯issueã®æ°ãæ¿ããå¢æ¸ãã¾ããã次第ã«0ã«åæãã¦ããã¾ãã
ç»é¢æ°ããããªãã«ãã£ãããæ©è½ã®éçºææã«ãã£ã¦å®è£ ã®ä»æ¹ãéã£ãã(Storyboard/xib ã®å©ç¨æç¡ãªã©)ãããªã©ãå°å³ãªããã¨ã¦ã大å¤ãªä½æ¥ã§ããã
ã¢ããªã±ã¼ã·ã§ã³ã®æ¤è¨¼
ãã¶ã¤ã³ãç½®ãæããã ãã¨ãã£ã¦ããä¿®æ£ã¯ç¢ºå®ã«è¡ã£ã¦ããããã§ããã®ä½æ¥ã«ãã£ã¦ã¨ã³ãã°ãã¦ãã¾ãå¯è½æ§ãããã¾ãããï¼ ãã¶ã¤ã³é¢ã§ã®ãã§ãã¯ã ãã§ãªãããã¹ãã¨ã³ã¸ãã¢ãç»é¢ã®åä½ãå¤ãã£ã¦ãã¾ã£ã¦ããªãããå¤ããã¶ã¤ã³ãããã£ãã¾ã¾ã®ç»é¢ããªãããªã©æ§ã ãªè¦ç¹ããä¿®æ£ããã¢ããªã±ã¼ã·ã§ã³ã®ç¢ºèªãè¡ãã¾ããã ä¿®æ£æéä¸ã¯æ¯æ¥å¤éã«ã¢ããªã±ã¼ã·ã§ã³ã®å ¨ç»é¢ã®ã¹ã¯ãªã¼ã³ã·ã§ãããè¨é²ããã¹ã¯ãªãããå®è¡ããç»é¢å´©ããèµ·ãã¦ãªãããæ°ãã¶ã¤ã³æªåæ ã®ç»é¢ã¯ãªãããé²æç¶æ³ã®ç¢ºèªã«å©ç¨ãã¦ãã¾ããã
CookpadUI
æ°ãããã¶ã¤ã³ãç»é¢ã«é©ç¨ããéã«ãä½æ¥ãç°¡ç¥åãããã CookpadUI ã¨ãããã©ã¤ãã¼ããªã©ã¤ãã©ãªãä½ãã¾ããã ãã®ã©ã¤ãã©ãªã«ã¯ããã使ãè²ããã©ã³ããå®ç¾©ããã¦ãããã·ã³ãã«ãã©ã³ããå ã«ç»åãçæããæ©è½ãªã©ãããã¾ãã
ã¯ãã¯ãããã§ã¯ã¯ãã¯ãããã¢ããªä»¥å¤ã®ã¢ããªãä½ã£ã¦ãããä»å¾ãå¢ãã¦ããã®ã§ãå°æ¥çã«ã¯è²ã ãªã¢ããªãããã®ã©ã¤ãã©ãªãå©ç¨ãã¦ããããããã«èãã¦ä½ã£ã¦ãã¾ãã ã©ã¤ãã©ãªã¨ããå½¢ã§åãåãã¦ããã¨ãã¯ãã¯ããããããã空æ°æã®ãããªãã®ãã¢ããªéã§çµ±ä¸ããã®ã«æå¹ã§ããã¨èãã¦ãã¾ãã
è²ã¨ãã©ã³ã
ã¢ããªã®ä¸ã§ä½¿ç¨ããè²ã¨ãã©ã³ãã¯ããç¨åº¦æ±ºã¾ã£ã¦ããã®ã§ãUIColor 㨠UIFont ã®ã«ãã´ãªãå®ç¾©ã㦠CookpadUI ã«å«ãã¦ãã¾ãã ç»é¢ã®æ§ã ãªé¨åã§ç´°ããæå®ãã¦ãã¾ãã¨ãä»åã®ãããªå¤§è¦æ¨¡ãªå¤æ´ã®æã«å°ã£ã¦ãã¾ãã¾ãããç»é¢ã«ãã£ã¦ä¼¼ããããªå¥ã®è²ãæå®ãã¦ãã¾ã£ã¦ã¢ããªå ã§ã®çµ±ä¸ãå´©ãã¦ãã¾ããããªãã¨ãããã¾ãã è²ããã©ã³ãã«æå³ã®ããååãã¤ãã¦ç¨æãã¦ãããã¨ã§ãæ°ããæ©è½ã»ç»é¢ã追å ããã¨ãã«ããã®è²ã»ãã©ã³ãã使ããã¨é¸æãããã¨ãã§ãã¾ãã å½ããåã®ãã¨ã¨ããã°å½ããåã®ãã¨ãªãã§ããããã®æ©ä¼ã«æ´çãã¦ã¿ã¾ããã
ãã ããã®æ¹æ³ã«ã¯èª²é¡ãããã¾ãã ãã㯠Storyboard/xib ã®ãã㪠Interface Builder ã使ããã®ã¨ç¸æ§ãæªããã¨ã§ãã ã¯ãã¯ãããã¢ããªã¯ã³ã¼ãã§ç»é¢ã¬ã¤ã¢ã¦ããå®ç¾©ãã¦ããé¨åãå¤ãããã®ãããªå ´æã§ã¯ãã¾ãæå®ã§ãã¾ããããStoryboard/xibã§ã¯ã©ãããããããæ©ãã§ãã¾ãã awakeFromNib: ãªã©ã§ã³ã¼ãã§æå®ãããã¨ãã§ããã§ãããããInterfaceBuilderã®è¯ããçãããªããªã£ã¦ãã¾ãã¾ãã ãã®ãããInterfaceBuilder ã使ããã®ã§ã¯ç´æ¥æå®ãã¦ãã¾ãã InterfaceBuilderã§è²ã»ãã©ã³ããæå®ããéã«ã³ã¼ãä¸ã®åè£ããé¸ã¹ããããªãã®ãããã°ããã®ã§ãã⦠ãªã«ãããæ¹æ³ããã£ããæãã¦æ¬²ããã§ãã
ã¡ãªã¿ã«ããã©ã³ãã«é¢ãã¦ã¯ Dynamic Type ãããã¾ãããã¯ãã¯ãããã¢ããªã¯ iOS6 ã®ãµãã¼ããç¶ãã¦ããã®ã§ä½¿ã£ã¦ãã¾ããã
UIColor 㨠UIFont ã®ã«ãã´ãªã«ã¯ä¸é·ä¸çããããã§ãããè²ããã©ã³ãæå®ã«ååãã¤ãããã¶ã¤ã³æ å½è ã¨ã®ã³ãã¥ãã±ã¼ã·ã§ã³ãã¼ã«ã¨ããã®ã¯ããªãæå¹ã§ããã
ã·ã³ãã«ãã©ã³ã
ã¯ãã¯ãããã§ã¯ç¬èªã®ã·ã³ãã«ãã©ã³ããä½ã£ã¦ãã¦ããã¶ã¤ã³ãã¼ã«ã¨ãã¦å©ç¨ãã¦ãã¾ãã ãããiOSã¢ããªããèªç±ã«å©ç¨ã§ããããã«ãã¦ä»åã®ãã¼ã¸ã§ã³ããå©ç¨ãã¦ãã¾ãã
FontAwesomeKit ã¨ããã©ã¤ãã©ãªããããããã«ä¹ã£ããå½¢ã§å®è£ ãã¦ãã¾ãã ãã®ã©ã¤ãã©ãªã使ãã¨ãã·ã³ãã«ãã©ã³ãããèªç±ãªè²ããµã¤ãºã®UIImageã¤ã³ã¹ã¿ã³ã¹ãå¾ããã¨ãã§ãã¾ãã ç¬èªã®ã·ã³ãã«ãã©ã³ãã使ãæ¹æ³ã¯ãä¸è¨ãã¼ã¸ã® Using Custom Icon Font ã®ç¯ã«æ¸ãã¦ããã¾ãã
ãã®ä»çµã¿ã使ãã¨ãããããç»åãå ´é¢ã端æ«ãµã¤ãºã«ãããã¦ããã¤ãç¨æããå¿ è¦ããªããªãã¾ãã ç»åãä½æããè² æ ãæ¸ãã ãã§ãªããã¢ããªã®ãªã½ã¼ã¹ãåæ¸ãç»é¢ã®ãããã¿ã¤ãã®ä½æã«ãå©ç¨ã§ãã¦è¯ããã¨å°½ããã§ãã
ä¾ãã°ãã¯ãã¯ãããã®ãã´ç»åã¯ãã®ããã«æ¸ããã¨ã§çæã§ãã¾ãã
CUICookpadSymbols *symbol = [CUICookpadSymbols cookpadIconWithSize:64]; [symbol addAttribute:NSForegroundColorAttributeName value:[UIColor cui_grayColor]]; UIImage *cookpadImage = [symbol imageWithSize:CGSizeMake(64, 64)];
ç°¡åãªç»åã®ä½æ
ãã¶ã¤ã³ãå¤æ´ãããã¨ã§ã·ã³ãã«ãªç»é¢è¦ç´ ãå¢ãã¾ããã ãã®ãããªç»é¢è¦ç´ ãããããåºã¦ããã®ã§ãããããç»åãç¨æããªãã¦ãæ¸ãããã«ããã¿ã³ã®èæ¯è²ãç»åã«è¢«ããããããã³ã¼ãã§çæã§ããããã«ãã¾ããã åç´ã« UIBezierPath ã§æç»ãããã®ã UIGraphicsGetImageFromCurrentImageContext é¢æ°ã§ UIImage ã«ãããã®ã§ãã è²ã¨ç©å½¢ãä¸ãããUIImageã®ã¤ã³ã¹ã¿ã³ã¹ãä½ãã¡ã½ãããç¨æããã ãã§ããã¡ãã¡ã§ä¾¿å©ã«ä½¿ããããã«ãªãã¾ããã
ç»åã«ãã4è²ã®ãã¿ã³ã¯UIButtonã®ãµãã¯ã©ã¹ã§å®ç¾©ããã¦ãã¾ãã ä¸ã§ã¯ä»¥ä¸ã®ããã«ãã¦ç»åãçæã㦠setBackgroundImage:forState: ã§æå®ãã¦ãã¾ãã
... UIColor *buttonColor = [UIColor cui_greenColor]; UIColor *highlightedColor = [[UIColor cui_greenColor] cui_colorForHeavyHighlight]; UIColor *disabledColor = [UIColor cui_greenColorWithAlpha:0.5]; [self setBackgroundImage:[self backgroundImageWithColor:buttonColor] forState:UIControlStateNormal]; [self setBackgroundImage:[self backgroundImageWithColor:highlightedColor] forState:UIControlStateHighlighted]; [self setBackgroundImage:[self backgroundImageWithColor:disabledColor] forState:UIControlStateDisabled]; ... - (UIImage *)backgroundImageWithColor:(UIColor *)color { CGRect rect = CGRectMake(0, 0, CUIButtonCornerRadius * 2 + 1, CUIButtonCornerRadius * 2 + 1); UIEdgeInsets capInsets = UIEdgeInsetsMake(CUIButtonCornerRadius, CUIButtonCornerRadius, CUIButtonCornerRadius, CUIButtonCornerRadius); return [[UIImage cui_imageWithColor:color roundedRect:rect cornerRadius:CUIButtonCornerRadius] resizableImageWithCapInsets:capInsets]; }
å·¦ä¸ã¨å³ä¸ã ãã丸ãç·ã®ãããããããã¯ãã®ããã«æ¸ããã¨ã§çæã§ãã¾ãã
UIImage *badgeImage = [UIImage cui_badgeImageWithText:@"ãããã" backgroundColor:[UIColor cui_greenColor] roundedRect:CGRectMake(0, 0, 48, 18) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(3.0, 3.0)];
ã¾ã¨ã
ã¯ãã¯ãããiOSã¢ããªã®ãã¶ã¤ã³ãªãã¥ã¼ã¢ã«ã®è£å´ãã»ãã®å°ãã§ã¯ããã¾ãããç´¹ä»ãã¾ããã ã¯ãã¯ãããã§ã®ã¢ããªéçºã®æµãã空æ°ã¿ãããªãã®ãä¼ããã°å¹¸ãã§ãã ä»åã¯ãã¶ã¤ã³ãªãã¥ã¼ã¢ã«æã®è©±ã«ãªãã¾ããããã¯ãã¯ãããã§ã¯ããããã¢ããªéçºã®é²ãæ¹ããã£ã¨èãã¦ãã¾ãã åèã«ãªã£ãï¼ã¨ããã£ã¨è¯ãæ¹æ³ããããï¼ã¨ãã風ã«ãã¤ãã£ãã¢ããªéçºçéããã£ã¨ãã£ã¨çãä¸ãã£ã¦ãã£ããããããã§ãã