ã¯ããã«
ããã«ã¡ã¯ãç§ã®ååã¯Nick Snyderã§ãLinkedInã®ãœãããŠã§ã¢ãšã³ãžãã¢ã§ãã ä»æ¥ãèªåã¬ã€ã¢ãŠãã«é¢ããã¹ããŒãªãŒããäŒãããããšæããŸãã
- LinkedInã§ã®äœ¿çšæ¹æ³ã
- åºäŒã£ãåé¡ã
- ç¶æ³ã«ãã£ãŠã¯ãèªåã¬ã€ã¢ãŠãã®äœ¿çšãåæ¢ããã®ã¯ãªãã§ããã
- ãããŠã代ããã«äœ¿çšãããã®ã
è¯ããã¥ãŒã¹
è¯ããã¥ãŒã¹ããå§ããããšæããŸãã
- LinkedInã§ã¯ãèªåã¬ã€ã¢ãŠããåºç¯å²ã«äœ¿çšããŠããŸãã ããã¯ããã¹ãŠã®ã¢ããªã±ãŒã·ã§ã³ã§ã€ã³ã¿ãŒãã§ãŒã¹ãæ§ç¯ããäž»ãªæ¹æ³ã§ãã
- èªåã¬ã€ã¢ãŠãã¯ããµããŒããä¿é²ãã匷åãªããŒã«ã§ãã
- ããŸããŸãªç»é¢ãµã€ãºã
- å³ããå·Šã«ç¶Žãèšèªã
æªããã¥ãŒã¹
æªããã¥ãŒã¹ã¯ãèªåã¬ã€ã¢ãŠãã®ããã©ãŒãã³ã¹ãååã§ã¯ãªãããšã§ãã
- è€éãªãã¥ãŒéå±€ã«ã¯å¯Ÿå¿ããŠããŸããïŒåŸç¶ã®ãã¬ãŒã³ããŒã·ã§ã³ããããã¥ãŒæ°ã®ç·åœ¢å¢å ã«äŒŽãèšç®æéã®éç·åœ¢å¢å ã«ã€ããŠè©±ããŠããããšã¯æããã§ãã
- äžéšã®iOSãªãªãŒã¹ã§ããã©ãŒãã³ã¹ã®äœäžãèŠãããŸããã
- äžéšã®ã€ã³ã¿ãŒãã§ã€ã¹ã¬ã€ã¢ãŠãã§ã¯ãããã©ãŒãã³ã¹ãäºæž¬ã§ããªãã»ã©äœäžããå ŽåããããŸãïŒä»¥éãã¬ã€ã¢ãŠãã¯ãã¬ã€ã¢ãŠãã-ãããTranslããšç¿»èš³ãããŸãïŒã
ïŒããã«ããã©ã³ã¹ã¯ãªããã®ããã¹ããšã¹ã©ã€ãã®ããã¹ããå€§å¹ ã«éè€ããŠããå Žåãæ å ±ã倱ãããšãªãããŒãžããŸããããã¹ããšã¹ã©ã€ãã¯ãèè ã®èš±å¯ãåŸãŠäœ¿çšãããŸãã-ãããTranslãïŒ
èªåã¬ã€ã¢ãŠãã®åé¡
LinkedInã¢ããªã±ãŒã·ã§ã³ã®ããŒã¯ã¢ããã®äŸãèããŠã¿ãŸãããã 2ã€ã®ã©ãã«ããããŸãïŒä»¥éããã©ãã«ããšããããã¹ãã§äœ¿çšãããŸã-ãããTranslãïŒãå·ŠåŽã«è€æ°è¡ã®ã©ãã«ãå³åŽã«åäžè¡ã®ã©ãã«ããããŸãã ãã¹ãŠã®ã³ã³ãã³ãã衚瀺ããã®ã«ååãªã¹ããŒã¹ã確ä¿ããã«ã¯ãé©åãªã©ãã«ãå¿ èŠã§ãã å·Šã®ã©ãã«ã«ã¯ãç¹å®ã®éã®ããã¹ãã®ã¿ãå«ãŸããŠãããæ倧2è¡ãå ããå¿ èŠããããŸãã
ã泚æ èªåã¬ã€ã¢ãŠãã®ããã©ãŒãã³ã¹ãäœäžãããŸãã å·ŠåŽã«ã¯ãæ倧2è¡ã®ã©ãã«ããããŸãã å³åŽã«ã¯ã次ã®ããããã£ãæã€ã©ãã«ããããŸãã
- ã³ã³ãã³ãã®å§çž®-ããªãã¡ ã©ãã«ã¯ãå«ãŸããããã¹ãã衚瀺ããã®ã«ååãªæå°ã¹ããŒã¹ã®ã¿ãå æããŸãã
- èå§çž®æ§-ããªãã¡ ã©ãã«ã¯ãå«ãŸããããã¹ãã衚瀺ããã®ã«å¿ èŠãªæå°ãµã€ãºãããå°ãããµã€ãºã«çž®å°ããããšã«æµæããŸãã
èªåã¬ã€ã¢ãŠãã䜿çšããŠèª¬æããããŒã¯ã¢ãããå®è£ ããã«ã¯ãé©åãªã©ãã«ã«é©åãªããããã£ãèšå®ããŸããã€ãŸããã³ã³ãã³ãã®å§çž®ãšå§çž®ã«å¯Ÿããèæ§ã§ãã ããã¯iOS 8ã§ããŸãæ©èœããéçºäžã®ãã¹ãŠã®ãã¹ãããŒã¿ã§ããŸãæ©èœããŸããã ããããiOS 9ã®ãªãªãŒã¹ã§ã¯ããã®å®è£ ã«ããäžéšã®ãŠãŒã¶ãŒã«å€§ããªããã©ãŒãã³ã¹ã®åé¡ãçºçããŸããã ãããŠããŠãŒã¶ãŒãäžå¹³ãèšããŸã§ããããã®åé¡ã«ã€ããŠã¯ç¥ããŸããã§ããã
ã泚æ iPhone 6ã®èªåã¬ã€ã¢ãŠãã©ã³ã¿ã€ã ã暪軞ã¯ãã¥ãŒã®æ°ã§ãã 瞊軞ã¯èªåã¬ã€ã¢ãŠãã©ã³ã¿ã€ã ã§ãã éãã°ã©ã-2è¡ã®èªåã¬ã€ã¢ãŠããåããUIScrollViewã èµ€ãã°ã©ã-1è¡ã®èªåã¬ã€ã¢ãŠããåããUIScrollViewã
æããã«ãããã©ãŒãã³ã¹ã®åé¡ã«é¢ãããŠãŒã¶ãŒããã®éç¥ãåãåãã®ã¯æ±ºããŠã¯ãŒã«ã§ã¯ãããŸããã ããªãã¯ããããã¯ã©ãã»ã©æªãã®ã§ããããïŒã ãã®ç¶æ³ã§ã¯ãå·ŠåŽã®ã©ãã«ã«è€æ°ã®è¡ãå«ãŸããŠããå Žåãéãç·ã¯ãç¹å®ã®ãã¥ãŒæ°ã«å¯ŸããŠããŒã¯ã¢ããã«ãããæéã瀺ããŸãã ã芧ã®ãšããããã¥ãŒã®æ°ãšãšãã«éãç·ãããã«äžãããŸãã ãããåé¡ã®åå ã§ããã
å·ŠåŽã®ã©ãã«ã«1è¡ãŸãã¯ä»ã®ããŒã¿ã¿ã€ãã®ã¿ãå«ãŸããŠããå Žåããã®ãããªåé¡ã¯ãããŸããã ãã®ãããç¹å®ã®ããŒã¿åãåé¡ãåŒãèµ·ãããŸããã
LinkedInãã¥ãŒã¹ãã£ãŒãã
- ãã°ããã®éãããã©ãŒãã³ã¹ã®åé¡ã®ãããèªåã¬ã€ã¢ãŠãã¯äœ¿çšãããŠããŸããã
- åãã¥ãŒã¯ãããŒã¯ã¢ããã³ãŒããæåã§å®è£
ããŸãã
- ç¶æããã®ã¯é£ãã
- ãããã¡ã€ã«ç»é¢ã«é©çšããããã®åå©çšå¯èœãªãœãªã¥ãŒã·ã§ã³ã欲ããã§ãã
LinkedInãã¥ãŒã¹ãã£ãŒãã®å ŽåãAuto Layoutã®ããã©ãŒãã³ã¹ãå®ç§ãšã¯ã»ã©é ãããšãå®éã«ç¥ã£ãŠããŸããã ãã®ãããLinkedInã¯é·ãéAuto Layoutã䜿çšããŠããŸããã ãã£ãŒãã§ã¯ãåãã¥ãŒãŸãã¯ã»ã«ã¯ãlayoutSubviewsã䜿çšããŠç¬èªã®ããŒã¯ã¢ããã³ãŒããå®è£ ããŸãã ãã®ããŒã¯ã¢ããã¯æåã§ã¯ããã«é«éã«åäœããŸãã ãã ããåé¡ã¯ããã®ãããªã³ãŒãã®ãµããŒãã䜿ãæããããããšã§ãã 2ã€ã®æ©èœããããŸãã æåã¯é«ããèšç®ããã®ã§ãã»ã«ã®é«ããããŒãã«ãŸãã¯UICollectionViewã«äŒããããšãã§ããŸãã ãããŠã2çªç®ã¯å®éã®ããŒã¯ã¢ãããå®è¡ããŸãã ãã®ããžãã¯ãå ±æããçç±ã¯ãããŒã¯ã¢ãããå®å šã«å®äºããå¿ èŠãªããé«ãã®èšç®ããã°ããå®è¡ã§ããããã§ãã
ã¢ããªã±ãŒã·ã§ã³ã®ä»ã®éšåã«ãåæ§ã®ãã®ãå¿ èŠã§ããã ããããããŸããŸãªåé¡ã解決ããã®ã«é©ãããã®ã§ãããå€ãã®äººã䜿çšã§ããããã«ãããã£ãã®ã§ãã
ã¬ã€ã¢ãŠããœãªã¥ãŒã·ã§ã³
ã¬ã€ã¢ãŠããœãªã¥ãŒã·ã§ã³ã®èŠä»¶
- éãã æåã§èšè¿°ãããã³ãŒããšäžç·ã«ãœãªã¥ãŒã·ã§ã³ãé«éã«ãããã£ãã®ã¯ãããããã§ã«ããŒãã«å«ãŸããŠããããã§ãã
- Swiftã¢ããªã±ãŒã·ã§ã³ã§èªç¶ãªAPIã ã¡ã€ã³ã¢ããªã±ãŒã·ã§ã³ãå«ãã»ãšãã©ã®LinkedInã¢ããªã±ãŒã·ã§ã³ã¯ãSwiftã§æžãããŠããŸãã
- æ·±å»ãªãããžã§ã¯ãã§ãµããŒãããã䜿çšãããŠããŸãã 補åã«ããŒã¿çãœãããŠã§ã¢ã䜿çšããããããŸããã
- ãªãŒãã³ãœãŒã¹ïŒäœãåé¡ãçºçããå Žåã®ãããã°ïŒã èªåã¬ã€ã¢ãŠãã§äœæ¥ãããšãã®èŠçã®1ã€ã®åå ã¯ãèªåã¬ã€ã¢ãŠãããã©ãã¯ããã¯ã¹ã§ããããšã§ãã ãããŠãäœããããŸããããªããšããç§ãã¡ã«ã¯çç±ãçºæããæ¹æ³ããããŸããã
- åãå ¥ãå¯èœãªã©ã€ã»ã³ã¹ïŒäŒç€Ÿã®åŒè·å£«ã®èŠ³ç¹ããïŒã
æ¢åã®ãœãªã¥ãŒã·ã§ã³
- React NativeãAsyncDisplayKitãComponentKit-Facebookã«ã¯å€ãã®åªãããªãŒãã³ãœãŒã¹ã©ã€ãã©ãªããããŸãã æ®å¿µãªãããã©ã€ã»ã³ã¹ã®ããã«äœ¿çšã§ããŸããã
- ã©ã€ãã©ãªã¯ã»ãšãã©ãããŸããããèŠæšãŠãããã©ã€ãã©ãªã®ããã«èŠããŸã-1幎以äžåã®æåŸã®ã³ãããã
- Render-2016幎5æã«äœæãããŸãããä»ãå¥ã®ã©ã€ãã©ãªRenderãèŠã€ãããŸããã ãããã圌女ã¯æ±ºå®ã®æã«ååšããŸããã§ããã
ãããã®ãããžã§ã¯ãã®ãããããç§ãã¡ã®ãã¹ãŠã®èŠæ±ãæºãããŠããªãã
æ°ããäœããæ§ç¯ããæ...
ãã®ããããããã¯ãŒã¯ã§èŠã€ãã£ããããžã§ã¯ãã®ãããããç§ãã¡ã®ãã¹ãŠã®èŠä»¶ãæºãããŠããŸããã§ããã ãããŠãLayoutKitãšåŒã°ãããã®ãäœæããŸããã
LayoutKitã¯ãiOSãmacOSãtvOSã§ãã¥ãŒããã°ããé 眮ããããã®ã©ã€ãã©ãªã§ãã 次ã«ããã®äœ¿çšæ¹æ³ãšåäœã説æããŸãã
LayoutKitãhello worldã
äžäœã¬ãã«ã§ã¯ãããŒã¯ã¢ããã¯3段éã§å®è¡ãããŸãã
- éçºè ã¯ãäžå€ã®ããŒã¿æ§é ã䜿çšããŠããŒã¯ã¢ãããå®çŸ©ããŸãã
- LayoutKitã¯ãåãã¥ãŒã®ãã¬ãŒã ãèšç®ããå¿ èŠã«å¿ããŠããã¯ã°ã©ãŠã³ãã¹ããªãŒã ã§èšç®ããŸãã
- ã¡ã€ã³ã¹ã¬ããã®LayoutKitã¯ããã¹ãŠã®ãã¥ãŒãäœæãããããã«ãã¬ãŒã ãå²ãåœãŠãŸãã
ç解ãæ·±ããããã«ãã·ã³ãã«ã ãå®å šã«å®è£ ãããããŒã¯ã¢ããã®äŸãæ€èšããŠãã ããã ãã®ããŒã¯ã¢ããã«ã¯ãã¯ãŒã«ããç»åãããã¹ãã©ãã«ããããŸãã
æåã®éšåã¯ãUIImageViewã®ããŒã¯ã¢ãããäœæããããšã§ãã ãã®ãããUIImageViewãå«ã¿ãå¹ ãšé«ãã50ãã¯ã»ã«ã§ããSizeLayoutãšåŒã°ããåºå®ãµã€ãºã®ã¬ã€ã¢ãŠããå¿ èŠã§ãïŒããããå ã®ãã¯ã»ã«ã§ã®ç¿»èš³ïŒã æ§æãããã¯ã§ãUIImageViewã®ç»åãèšå®ããŸãã
let image = SizeLayout<UIImageView>( width: 50, height: 50, config: { imageView in imageView.image = UIImage(named: âearth.jpgâ) } )
次ã«ãã©ãã«ã®ããŒã¯ã¢ãããå¿ èŠã§ãã å©çšå¯èœãªã¹ããŒã¹ã®ããã¹ããšäžå€®æããèšå®ããŸãã
let label = LabelLayout( text: âHello World!â, alignment: .center )
ãããã®ãã¥ãŒãé£ãåããã«é 眮ããããã4ãã¯ã»ã«ã®ééã§æ°Žå¹³ã¹ã¿ãã¯ãäœæããŸãã
StackLayout( axis: .horizontal, spacing: 4, sublayouts: [image, label] )
æåŸã«ããšããžã®åšãã«ããã£ã³ã°ãå¿ èŠã§ãã æ°ããäœæãããStackLayoutãã©ããããInsetLayoutãäœæããŸãã
helloWorld = InsetLayout( insets: UIEdgeInsets(top: 4, left: 4, bottom: 4, right: 8), sublayout: stack )
ãhello worldãããŒã¯ã¢ããã®æºåãã§ããã®ã§ãé 眮ã¡ãœãããåŒã³åºããŸãã ãã®ã¡ãœããã¯ããã¹ãŠã®ãã¥ãŒãšã¬ã€ã¢ãŠãã®ãã¹ãŠã®ãã¬ãŒã ãååž°çã«èšç®ããŸãã ããã¯ãããã¯ã°ã©ãŠã³ãã¹ã¬ããã§å®è¡ã§ããŸãã
éå§ä»¥æ¥ãé çœ®ïŒ é 眮 -ãããTranslãïŒã¯å€æŽãããŠããªãããŒã¿æ§é ã§ãããããã¡ã€ã³ã¹ã¬ããã«æ»ããŠmakeViewsãäœæã§ããŸãã
// . let arrangement = helloWorld.arrangement() // . arrangement.makeViews(in: rootView)
rootViewãã©ã¡ãŒã¿ãŒãmakeViewsã¡ãœããã«æž¡ããå¿ èŠãªãã¥ãŒãããã«äœæãããããã«ããŸãã ãã©ã¡ãŒã¿ãæž¡ãããªãå ŽåãmakeViewsã¯ãå¿ èŠãªåŠçãå®è¡ã§ãããã¥ãŒãè¿ããŸãã
ããã§ãããŒã¯ã¢ãããçµäºããŸããã
å¥ã®äŸ
äžèšã®äŸã§ã¯ããã©ã¡ãŒã¿ãŒãªãã®é 眮ãåŒã³åºããŸããã
// . // . helloWorld.arrangement()
å¥ã«ãã£ãŠã¿ãŸãããïŒ
// . helloWorld.arrangement(width: 200)
æ瀺çãªå¹ ãæå®ã§ããã¡ãœããã¯ããã«ããŒã¯ã¢ããããŸãïŒ
ã€ã³ãã³ããå¢å ãã䜿çšå¯èœãªãã¹ãŠã®ã¹ããŒã¹ãå æãããŠããããšãããããŸãã ãã®å¹ ã¯ãããšãã°ç»é¢ã®å¹ ã«ãªããŸãã
å¥ã®äŸ-ã¢ãã¡ãŒã·ã§ã³ãã
ããŒã¯ã¢ããã¯ã¢ãã¡ãŒã·ã§ã³åã§ããŸãã äŸãšããŠåçŽãªSizeLayoutã䜿çšããŠãããè¡ããŸãã ããã¯ã¹ãšåŒã³ãŸãããã viewReuseIdãã©ã¡ãŒã¿ãŒã䜿çšããŠããã¥ãŒãŸãã¯ããŒã¯ã¢ããã«äžæã®èå¥åãèšå®ã§ããŸãã ããã«ãããLayoutKitã¯ããåãç¶æ ã®ã©ã®ãã¥ãŒããåŸãç¶æ ã®ã©ã®ãã¥ãŒã«å¯Ÿå¿ããããèªèããŸãã
ãã®äŸã§ã¯ããåãç¶æ ã§ã¯ãããã¯ã¹ãã¯50x50ãã¯ã»ã«ã®æ£æ¹åœ¢ã§ãããåŸç¶æ ã§ã¯25x25ãã¯ã»ã«ã®æ£æ¹åœ¢ã§ãã
// viewReuseId // "" let before = SizeLayout( width: 50, height: 50, viewReuseId: âboxâ) // "" let after = SizeLayout( width: 25, height: 25, viewReuseId: âboxâ)
ãããã¯2ã€ã®ç°ãªãããŒã¯ã¢ããã§ãã doããŒã¯ã¢ããã䜿çšããŠãã¥ãŒã¬ã€ã¢ãŠããäœæããŸãã ãã®é 眮ããäœæããããã¥ãŒã¯ãã«ãŒããã¥ãŒïŒrootViewïŒã«é 眮ãããŸãã 次ã«ããã¢ãã¿ãŒãããŒã¯ã¢ããã䜿çšããŠãã¢ãã¡ãŒã·ã§ã³ã®æºåãè¡ããŸããã¢ãã¡ãŒã·ã§ã³ã¡ãœãããæã€ã¢ãã¡ãŒã·ã§ã³çšã®ç¹å¥ãªãªããžã§ã¯ããäœæããŸãã
// "" view rootView. before.arrangement().makeViews(in: rootView) // . let animation = after.arrangement() .prepareAnimation(for: rootView)
ã¢ãã¡ãŒã·ã§ã³ãªããžã§ã¯ããåãåã£ãåŸãéåžžã®åŒã³åºãUIView.animate withDurationã䜿çšããŠãanimation.applyã¡ãœãããæž¡ããšãããããŒã¯ã¢ããããå¥ã®ããŒã¯ã¢ãããžã®å€æŽãã¢ãã¡ãŒã·ã§ã³åãããŸãã
// . UIView.animate(withDuration: 5.0, animations: animation.apply)
å°ãè€éãªã¢ãã¡ãŒã·ã§ã³ã®äŸ
ïŒæ®å¿µãªããããœãŒã¹ã®ãããªã§ãã¢ãã¡ãŒã·ã§ã³ã¯è¡šç€ºãããŸãã-ãããã®ç¿»èš³ã§ããïŒ
èµ€ãš2ã€ã®ç°è²ã®æ£æ¹åœ¢ããããŸãã å¯äžã®æ³šæç¹ã¯ãå é ã®èµ€ãæ£æ¹åœ¢ãäžã®æ£æ¹åœ¢ã®åãã¥ãŒã§ãããäžã®æ£æ¹åœ¢ã®åãã¥ãŒã«ãªãããšã§ãã äž¡æ¹ã®æ£æ¹åœ¢ãå·Šããå³ã«ç§»åããŸãã äžã®æ£æ¹åœ¢ã®ãµã€ãºãå°ãããªããèµ€ãæ£æ¹åœ¢ã倧ãããªããŸãã
ãã¢ãã¡ãŒã·ã§ã³ã®æºåãã®æ®µéã§ã¯ã芪ãã¥ãŒãå€æŽããŠãã®ãããªè€éãªã¢ãã¡ãŒã·ã§ã³ãäœæã§ããŸãã ãã¢ãã¡ãŒã·ã§ã³ã®æºåããã¹ããããããšãäºæããçµæãåŸãããŸããã
LayoutKitã®ä»çµã¿
Swiftã®å©ç¹ã«ã€ããŠã話ãããããšæããŸãã LayoutKitã¯ãã¯ãªãŒã³ãªAPIãæäŸããããšãã§ããæ©èœã®ãããã§ãSwiftã§æžãããŠããŸãã ã€ãã·ã£ã©ã€ã¶ã§ã¯ããžã§ããªãã¯ããããã³ã«æ¡åŒµãããã³ããã©ã«ããã©ã¡ãŒã¿ã䜿çšããŸãã äžèšã®äŸã§ã¯ãæ¢ã«åŸãããå©ç¹ãèŠãããšãã§ããŸãã
LayoutKitã¯ã©ã®ããã«æ©èœããŸããïŒ ãã¹ãŠã®LayoutKitã®äžå¿ã«ã¬ã€ã¢ãŠããããã³ã«ããããããŒã¯ã¢ãããšã¯äœãã決å®ããŸãã 誰ã§ããã®ãããã³ã«ãå®è£ ã§ããLayoutKitã¯ãããå®è£ ããäºåå®çŸ©æžã¿ïŒåºæ¬ïŒããŒã¯ã¢ããã®å°ããªã»ãããæäŸããŸãã
ã泚æ å³ã®å·ŠåŽã«ã¯å€ãã®ããŒãã³ã°ããããäžå€®ã«ã¯ããŒã¯ã¢ãããããã³ã«ããããå³åŽã«ã¯ããŒã¯ã¢ãããšã³ãžã³ããããŸãã
ã¯ã©ã¹ã®ã³ã¬ã¯ã·ã§ã³ã§ããããŒã¯ã¢ãããšã³ãžã³ããããŸãã ãããã®ã¯ã©ã¹ã¯ãããŒã¯ã¢ãããããã³ã«ã®ã¿ã«åºã¥ããŠæ©èœããŸãããã¬ãŒã ã®ãµã€ãºãèšç®ããã€ã³ã¹ã¿ã³ã¹ãäœæããŸãïŒ ãã¬ãŒã¹ã¡ã³ãã®äœæã«ã€ããŠ-ã»ãŒç¿»èš³ïŒãã¢ãã¡ãŒã·ã§ã³ããžãã¯ãå®è¡ããŸãã
åºæ¬çãªããŒã¯ã¢ãã
åºæ¬çãªããŒã¯ã¢ããã¯ãããŒã¯ã¢ãããããã³ã«ã«ããã¯ãããèšç®ã§ãã
- LabelLayout-124è¡ã®ã³ãŒãã
- SizeLayout-164è¡ã®ã³ãŒãã
- InsetLayout-39è¡ã®ã³ãŒãã
- StackLayout-175è¡ã®ã³ãŒãã
ãããã®ããŒã¯ã¢ããã¯ãã¹ãŠäŸã§ãã§ã«èŠãŠããŸãã ãããã¯ã¡ã€ã³ãããã¯ã§ãããé©åãªæ°ã®ç°ãªããŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹ãæ§ç¯ããããšãã§ããŸãã
ã«ã¹ã¿ã ããŒã¯ã¢ãããäœæãã
4ã€ã®åºæ¬çãªã¬ã€ã¢ãŠãã§ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹ã説æã§ããªãå Žåã¯ã次ã®ããšãå®è¡ã§ããŸãã
- 4ã€ã®åºæ¬çãªæ§æãšãã¹ãã䜿çšããŠãç®çã®ããŒã¯ã¢ãããäœæããŸãã
- ãã¬ã€ã¢ãŠãããšåŒã°ããã¬ã€ã¢ãŠããããã³ã«ãå®è£ ããŠãç¬èªã®ããŒã¯ã¢ãããäœæããŸãã
LayoutKitãé«éåããçç±
2ã€ã®äž»ãªçç±ïŒ
- LayoutKitã¯ãèªåã¬ã€ã¢ãŠããªã©ã®å¶çŽã·ã¹ãã ã«äžè¬çãªãœãªã¥ãŒã·ã§ã³æ€çŽ¢ã¢ã«ãŽãªãºã ã䜿çšããŸããã å¯Ÿç §çã«ãåããŒã¯ã¢ããã¯ç¹æ®ãªã¢ã«ãŽãªãºã ã䜿çšããŸãã ããã«ãããããŒã¯ã¢ããããšã«å¹æçãªå®è£ ãååŸã§ããŸãã
- LayoutKitå šäœã§æãé ãã®ã¯ãStackLayoutå ã®æè»æ§ã«ãã£ãŠåã¬ã€ã¢ãŠãããœãŒãããããšã§ãã ãã以å€ã®å Žåãã¢ã«ãŽãªãºã ã®è€éãã¯OïŒnïŒã§ãã
å®éã«éæãããããã©ãŒãã³ã¹ã®ã¬ãã«ãæ°åã§èŠãŠã¿ãŸãããã ããã¯ãiOS 9ãæèŒããiPhone 6ã®å®è£ äŸã§ãã20åã®ã»ã«ãå«ãUICollectionViewFlowLayoutãåããUICollectionViewã䜿çšãããŸããã åã»ã«ã¯å šäœãšããŠãLinkedInãã¥ãŒã¹ãã£ãŒãã®å¯Ÿå¿ããã»ã«ã«äŒŒãŠããŸãã ããã¯ããªãã®ç»é¢ã¹ããŒã¹ãå æããŸãã
ãã®ã°ã©ãã§ã¯ãããã£ãšãã¯ãããè¯ããã§ãã 1xåºæºç¹ãšããŠæå®ããèªåã¬ã€ã¢ãŠãã UIStackViewã䜿çšãããšãèªåã¬ã€ã¢ãŠããããåäœãé ããªãããšãããããŸãã ããã¯ãUIStackViewãèªåã¬ã€ã¢ãŠãã®äžã«æ§ç¯ãããŠããããã§ãã å³ç«¯ã¯ãããŒã¯ã¢ãããæåã§é©çšããçµæã瀺ããŠããŸãã æåã¬ã€ã¢ãŠãã¯ãèªåã¬ã€ã¢ãŠãããã9.4åé«éã§ãã ç·è²ã®ããŒã¯LayoutKitã§ãããèªåã¬ã€ã¢ãŠãããã7.7åé«éã§ãã æåã®ããŒã¯ã¢ããã»ã©é«éã§ã¯ãããŸãããããã®ããã«ã¯ãå€ãã®ã³ãŒããèšè¿°ããããšãªãå€ãã®åªããæ©èœãå©çšã§ããŸãã
ã泚æ ããã©ãŒãã³ã¹ããŒã¯ã¢ããã®å®è£ ã å€ãã»ã©è¯ãã
äžæ¹ããããèŠãããšãã§ããŸãïŒ2ã€ã®ãã¬ãŒã ã®ã·ãŒã±ã³ã·ã£ã«è¡šç€ºã®ééã§ç¬èªã®ã³ãŒããå®è¡ããã®ã«ã©ããããæéãå¿ èŠã§ããïŒ é»ãæ°Žå¹³ç·ã¯16ããªç§ã§ãã UIStackViewã䜿çšããå Žåããã£ãŒãé ç®ã®ããŒã¯ã¢ããã«ã¯46ããªç§ãããããšãããããŸãã èªåã¬ã€ã¢ãŠãã䜿çšããå Žå-28ããªç§ã ãã®ã°ã©ãã瀺ãããšã¯ãèªåã¬ã€ã¢ãŠããŸãã¯UIStackViewã䜿çšãããšãã¡ã€ã³ã¹ã¬ããã®åããŒã¯ã¢ããäžã«1ã€ãŸãã¯2ã€ã®ãã¬ãŒã ãã¹ããããããããšã§ãã
LayoutKitãšæåã¬ã€ã¢ãŠãã¯ã»ãŒåãã§ãã LayoutKitãŸãã¯æåã¬ã€ã¢ãŠãã䜿çšããå Žåã6ããªç§ããããããŸããã ããã«ãLayoutKitã䜿çšãããšãããã¯ã°ã©ãŠã³ãã¹ã¬ããã§ããŒã¯ã¢ãããå®è¡ã§ããŸãã
ã泚æ åäžã®ã»ã«ãæã€UICollectionViewã®ã¬ã€ã¢ãŠãæéã å°ãªãã»ã©è¯ãã
次ã«èšãããã®ã¯ãäžå€ã®ããŒã¿æ§é ã§ãã
äžå€ã®ããŒã¿æ§é
ããŒã¯ã¢ãããªããžã§ã¯ããšãã¹ãŠã®äžéããŒã¿æ§é ã¯äžå€ã§ãã ããã«ããã次ã®çµæãåŸãããŸãã
- ã¹ã¬ããã»ãŒãã ã¡ã€ã³ã¹ããªãŒã ãšããã¯ã°ã©ãŠã³ãã¹ããªãŒã éã§ããŒã¿ãããåãããæ©èœã
- äºåã«ããŒã¯ã¢ãããç°¡åã«èšç®ããŠãã£ãã·ã¥ã§ããŸãã ããšãã°ããŠãŒã¶ãŒãå®éã«ç»é¢ãå転ããåã«ãããã¯ã°ã©ãŠã³ãã¹ã¬ããã§ç»é¢å転ã®ããŒã¯ã¢ãããäºåèšç®ã§ããŸãã
- ç°¡åãªãããã°ã å€æ°ãå€æŽã§ããªãããšãäºåã«ããã£ãŠããå Žåãããããã§ãã¯ããå¿ èŠã¯ãããŸããã
LayoutKitã®ãã®ä»ã®å©ç¹
- å³ããå·Šãžã®ã¹ãã«ã«ããèªåèšèªãµããŒãã
- 宣èšåããŒã¯ã¢ããã®èªã¿åããæžã蟌ã¿ãäœæããã¹ãã®å®¹æãã
- ãµã³ãããã¯ã¹ã§ã®ã©ããããããã¿ã€ãã³ã°ã
- iOSãmacOSãtvOSããµããŒãããŸãã
ç³èŸŒã¿
LayoutKitã¯æ¥çã§äœ¿çšããæºåãã§ããŠããŸããïŒ ã¯ããã¡ã€ã³ã®LinkedInã¢ããªã±ãŒã·ã§ã³ãšæ±äººæ€çŽ¢ã¢ããªã±ãŒã·ã§ã³ã§äœ¿çšããŠããŸãã
ç§ãã¡ã®çµéšã§ã¯ãLayoutKitãšã³ãžãã¢ã®ãã¬ãŒãã³ã°ã¯éåžžã«ç°¡åã§ããã äžæ¹ãèªåã¬ã€ã¢ãŠãã®åŠç¿ã¯ããã»ã©ç°¡åã§ã¯ãããŸããã§ããã
ãããã«
ãªãŒãã³ãœãŒã¹
1ïŒLayoutKit-ãªãŒãã³ãœãŒã¹ãœãããŠã§ã¢ã ã³ãŒãã¯layoutkit.orgã§å ¥æã§ããŸãã
2ïŒApache 2.0ã©ã€ã»ã³ã¹ãç¹èš±è©æ¬ºãªãã
3ïŒ2016幎6æ22æ¥ã®ãªãªãŒã¹æ¥ã
4ïŒä»æ¥ïŒ2017幎5æã®åãã«å®éã®ããŒã¿ãåããŸãã-ãããTranslãïŒGitHubã§ïŒ59ãªãã¶ãŒããŒã1996æã136ãã©ãŒã¯
è¬èŸ
LayoutKitãæäŒã£ãŠãããã¿ããªã«æè¬ããŸãã ããããšããã»ã«ã²ã€ã»ã¿ã°ã¢ãŒïŒã»ã«ã²ã€ã»ã¿ã¬ãŒïŒãã¢ã³ãã£ã»ã¯ã©ãŒã¯ïŒã¢ã³ãã£ã»ã¯ã©ãŒã¯ïŒãããŒã¿ãŒã»ãªãã·ãŒïŒããŒã¿ãŒã»ãªãã·ãŒïŒã
èè ã«ã€ããŠ
Nick Snyderã¯ãLinkedInãœãããŠã§ã¢éçºãšã³ãžãã¢ã§ãã 圌ã¯çŸåšãäŒç€Ÿã®ãã¹ãŠã®ã¢ããªã±ãŒã·ã§ã³ã«ã¹ã±ãŒã©ãã«ãªã¢ãã€ã«ã¢ããªã±ãŒã·ã§ã³ã®ã€ã³ãã©ã¹ãã©ã¯ãã£ã®æ§ç¯ã«åãçµãã§ããŸãã 圌ã¯ãã¡ã€ã³ã¢ããªã±ãŒã·ã§ã³ã®ææ°ããŒãžã§ã³ãå«ããäŒç€Ÿã®3ã€ã®ã¢ããªã±ãŒã·ã§ã³ã®æºåã«åå ããŸããã ç§ã®ãæ°ã«å ¥ãã¯ãããããªAPIã§åå©çšå¯èœãªã³ã³ããŒãã³ããäœæããããšã§ãã