MOStoreButton 0.1.0

MOStoreButton 0.1.0

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布最新发布2016年3月

Moath Othman维护。



  • 作者
  • Moath Othman

MoStoreButton

一个简单易用的 iOS 7 Appstore 样式的按钮

需求

  • Xcode 5
  • iOS 7.0+
  • ARC

屏幕截图

screenShot

用法

添加按钮

在此,我们应该设置标题、finishedDownloadingButtonTitle 和按钮代理!!!。

MOStoreButton*storeButton1 =[[MOStoreButton alloc]initWithFrame:CGRectMake(100, 260,80, 40) andColor:[UIColor blueColor]];

storeButton1.buttonDelegate=self;
storeButton1.titleLabel.font =[UIFont systemFontOfSize:17];
storeButton1.finishedDownloadingButtonTitle =@"Open";
[storeButton1 setTitles:@[@"free",@"INSTALL"]];
[self.view addSubview:storeButton1]; 

代理

我们在这里关心 currentIndex,它决定了按钮过渡的状态,请看演示以获得更多澄清。

-(void)storeButtonFired:(MOStoreButton *)button{

NSLog(@"click  %i",button.currentIndex);

}