Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uibutton有没有可能直接使用系统类型? #19

Open
Jichao opened this issue May 8, 2015 · 1 comment
Open

uibutton有没有可能直接使用系统类型? #19

Jichao opened this issue May 8, 2015 · 1 comment
Assignees

Comments

@Jichao
Copy link
Contributor

Jichao commented May 8, 2015

从view-component来看,似乎类型并不可以指定,而只能够使用custom。

    UIButton * button = [self buttonWithType:UIButtonTypeCustom];

    button.renderer = renderer;

    [[button buttonAgent] enableEvents];

    return button;

但是如果用户想使用systemtype,则没有办法。
如果确实是没有办法的话,是不是考虑指定一个参数,使得用户可以创建systemtype的uibutton.

@qfish
Copy link
Contributor

qfish commented May 9, 2015

应该是可以的,可以考虑通过属性来做,然后根据type走不同的构造函数.
<UIButton type="UIButtonTypeSystem"/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants