aminly's recent timeline updates
aminly

aminly

V2EX member #130768, joined on 2015-08-05 10:07:16 +08:00
aminly's recent replies
Aug 5, 2015
Replied to a topic by xiaobetty 推广 晒出你最蠢的一段代码,送 Cherry 鼠标垫
for (int i =0 ; i<4; i++) {
UIButton *btn =[[UIButton alloc]init];
float ppx = ((kMainScreenWidth-15-40)-55)/4;

UILabel *title =[[UILabel alloc]init];
[title setFont:[UIFont systemFontOfSize:14]];
[title setTextColor:[UIColor colorWithHexString:@"#343434"]];

switch (i) {
case 0:

[btn setFrame:CGRectMake(15, self.LabelTitle.frame.origin.y+40,40,40)];
[title setFrame: CGRectMake(btn.frame.origin.x+btn.frame.size.width/2-12,btn.origin.y+btn.frame.size.width,24,20)];
[btn setBackgroundImage:[UIImage imageNamed:@"icon-qq"] forState:UIControlStateNormal];
[btn addTarget:self action:@selector(QQshareBtnClick:) forControlEvents:UIControlEventTouchUpInside];
title.text = @"QQ";
break;

case 1:
[btn setFrame:CGRectMake(ppx+55-9, self.LabelTitle.frame.origin.y+40,40,40)];
[title setFrame: CGRectMake(btn.frame.origin.x+btn.frame.size.width/2-15,btn.origin.y+btn.frame.size.width,30,20)];


[btn setBackgroundImage:[UIImage imageNamed:@"icon-msg"] forState:UIControlStateNormal];
[btn addTarget:self action:@selector(MSGshareBtnClick:) forControlEvents:UIControlEventTouchUpInside];
title.text = @"短息";
break;
case 2:
[btn setFrame:CGRectMake(kMainScreenWidth/2+ppx-40+9, self.LabelTitle.frame.origin.y+40,40,40)];
[title setFrame: CGRectMake(btn.frame.origin.x+btn.frame.size.width/2-15,btn.origin.y+btn.frame.size.width,30,20)];


[btn setBackgroundImage:[UIImage imageNamed:@"icon-wechat"] forState:UIControlStateNormal];
[btn addTarget:self action:@selector(WeChatshareBtnClick:) forControlEvents:UIControlEventTouchUpInside];
title.text = @"微信";
break;
case 3:
[btn setBackgroundImage:[UIImage imageNamed:@"icon-friendc"] forState:UIControlStateNormal];
[btn setFrame:CGRectMake(kMainScreenWidth-15-40, self.LabelTitle.frame.origin.y+40,40,40)];

[btn addTarget:self action:@selector(FriendCshareBtnClick:) forControlEvents:UIControlEventTouchUpInside];
title.text = @"朋友圈";
[title setFrame: CGRectMake(btn.frame.origin.x+btn.frame.size.width/2-22,btn.origin.y+btn.frame.size.width,45,20)];
break;
}

[self.shareView addSubview:title];
[self.shareView addSubview:btn];
}
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2793 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 18ms · UTC 06:48 · PVG 14:48 · LAX 23:48 · JFK 02:48
♥ Do have faith in what you're doing.