我正在设计Objective C的UIActionSheet,我想给Actionsheet按钮添加更多的颜色。可以通过CSS样式添加吗?如果是这样,请给我一个如何向UIButton添加样式的示例
发布于 2013-06-06 18:58:52
对于HTML webPages,您只能在webview中使用内联CSS。您无法将CSS添加到本机控件中。
发布于 2013-06-06 18:59:53
- (void)willPresentActionSheet:(UIActionSheet *)actionSheet
{
for(UIView *view in actionSheet.subViews)
{
if([view isKindOfClass:[UIButton class]])
{
UIButton *button = (UIButton *)view;
//here you style your button
}
}
}发布于 2013-06-06 19:02:37
如果您正在尝试使用CSS,请尝试使用http://www.nativecss.com/ (顺便说一句,我并不赞同使用此站点)
https://stackoverflow.com/questions/16960276
复制相似问题