【发布时间】:2012-04-24 11:59:10
【问题描述】:
这是我的应用程序的要求:
有一个日历类型的视图,它将显示日期、日期、当天的总工作时间。我需要的是,当我单击该特定方形块中的任意位置时,它会将我的页面重定向到新视图。
我正在考虑应该在该按钮上添加多个按钮和 UIView。 这可以解决我的问题,但它有点问题。我该怎么做?
【问题讨论】:
-
转向视图或视图控制器,告诉我你到底想要什么。您想在按钮上添加 uiview 或在 uiview 上添加按钮。
-
如果你想在 uibutton 上添加 uiview 那么可能是不可能的。
-
不确定是否正确理解你想要的,但可以看看 UIView 函数 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event; - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event; UIResponder 的(UIView 的超类)
-
也许这对我有用,谢谢。
标签: iphone ios5 uibutton customization