自定义 TTLauncherView 按钮大小
我正在尝试更改 TTLauncherView 中 TTLauncherViewButton 项目的默认大小,但是,我似乎找不到负责 TTLauncherView 中按钮大小的变量或源代码。
有人有建议吗?我正在尝试在 iPad 版本中使用更大的按钮。
唯一类似于我在默认样式表中找到的尺寸:
///////////////////////////////////////////////////////////////////////////////////////////////////
- (TTStyle*)launcherButtonImage:(UIControlState)state {
TTStyle* style =
[TTBoxStyle styleWithMargin:UIEdgeInsetsMake(-7, 0, 11, 0) next:
[TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:8] next:
[TTImageStyle styleWithImageURL:nil defaultImage:nil contentMode:UIViewContentModeCenter
size:CGSizeZero next:nil]]];
if (state == UIControlStateHighlighted || state == UIControlStateSelected) {
[style addStyle:
[TTBlendStyle styleWithBlend:kCGBlendModeSourceAtop next:
[TTSolidFillStyle styleWithColor:RGBACOLOR(0,0,0,0.5) next:nil]]];
}
return style;
}
I'm trying to change the default size of the TTLauncherViewButton items in TTLauncherView, however, i can't seem to find the either the variable or the source code responsible for the size of the buttons in TTLauncherView.
Anyone has suggestions? I'm trying to have bigger buttons in the iPad version.
The only thing resembled sizes i found in the default style sheet:
///////////////////////////////////////////////////////////////////////////////////////////////////
- (TTStyle*)launcherButtonImage:(UIControlState)state {
TTStyle* style =
[TTBoxStyle styleWithMargin:UIEdgeInsetsMake(-7, 0, 11, 0) next:
[TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:8] next:
[TTImageStyle styleWithImageURL:nil defaultImage:nil contentMode:UIViewContentModeCenter
size:CGSizeZero next:nil]]];
if (state == UIControlStateHighlighted || state == UIControlStateSelected) {
[style addStyle:
[TTBlendStyle styleWithBlend:kCGBlendModeSourceAtop next:
[TTSolidFillStyle styleWithColor:RGBACOLOR(0,0,0,0.5) next:nil]]];
}
return style;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我对此不确定,但找到了替代方案 - 它支持 iphone / ipad
试试这个,
https://github.com /rigoneri/myLauncher
提供与 TTLauncherView 相同的功能。
i m not sure about this , but found a alternative - it supports both iphone / ipad
Try this ,
https://github.com/rigoneri/myLauncher
provides same features of TTLauncherView.