Upgrade to Pro — share decks privately, control downloads, hide ads and more …

LINE Developer Meet Up #2

LINE Developer Meet Up #2

Yosuke Ishikawa

March 26, 2014
Tweet

More Decks by Yosuke Ishikawa

Other Decks in Technology

Transcript

  1. มߋՄೳͳϓϩύςΟΛߜΔ @interface ISCyclicPagesView : UIScrollView ! @property (nonatomic, readonly) NSInteger

    currentPage; @property (nonatomic, readonly) NSInteger numberOfPages; @property (nonatomic, assign) id <ISCyclicPagesViewDataSource> dataSource; @property (nonatomic, assign) id <ISCyclicPagesViewDelegate> delegate; ! - (void)reloadData; - (void)scrollToPage:(NSInteger)page direction:(NSInteger)direction animated:(BOOL)animated; ! - (NSInteger)pageForView:(UIView *)view; - (UIView *)viewForPage:(NSInteger)page; ! @end
  2. ֎͔Βݺ͹Εͯ΋͍͍ϝιουͷΈΛެ։ @interface ISCyclicPagesView : UIScrollView ! @property (nonatomic, readonly) NSInteger

    currentPage; @property (nonatomic, readonly) NSInteger numberOfPages; @property (nonatomic, assign) id <ISCyclicPagesViewDataSource> dataSource; @property (nonatomic, assign) id <ISCyclicPagesViewDelegate> delegate; ! - (void)reloadData; - (void)scrollToPage:(NSInteger)page direction:(NSInteger)direction animated:(BOOL)animated; ! - (NSInteger)pageForView:(UIView *)view; - (UIView *)viewForPage:(NSInteger)page; ! @end
  3. ಺෦ॲཧ༻ͷϓϩύςΟ͸ެ։͠ͳ͍ @interface ISCyclicPagesView () ! @property (nonatomic) NSInteger currentPage; @property

    (nonatomic) NSInteger numberOfPages; @property (nonatomic, strong) NSArray *reusableViews; ! @end
  4. Өڹൣғͷେ͖͍֦ு @implementation UIView (Additions) ! - (CGFloat)x { return self.frame.origin.x;

    } ! - (void)setX:(CGFloat)x { CGRect frame = self.frame; frame.origin.x = x; self.frame = frame; } ! @end
  5. Өڹൣғͷେ͖͍֦ு @implementation UIView (Additions) ! - (CGFloat)x { return self.frame.origin.x;

    } ! - (void)setX:(CGFloat)x { CGRect frame = self.frame; frame.origin.x = x; self.frame = frame; } ! @end
  6. Pod::Spec.new do |s| s.name = "ISDiskCache" s.version = "0.1.1" s.platform

    = :ios, "4.3" s.summary = "LRU disk cache for iOS." s.homepage = "https://github.com/ishkawa/ISDiskCache" s.source_files = "ISDiskCache/**/*.{h,m}" s.requires_arc = true s.author = { "Yosuke Ishikawa" => "[email protected]" } s.source = { :git => "https://github.com/ishkawa/ISDiskCache.git", :tag => "0.1.1" } s.license = { :type => "MIT", :text => <<-LICENSE ... LICENSE } end podspec