【问题标题】:How to create a frame and fill it with a segmented control? [closed]如何创建一个框架并用分段控件填充它? [关闭]
【发布时间】:2009-05-02 02:39:53
【问题描述】:

我想创建一个框架并用分段控件填充它。我该怎么做???

【问题讨论】:

  • 请重新陈述您的问题,以便更清楚您需要什么帮助。

标签: iphone objective-c cocoa cocoa-touch


【解决方案1】:

如果通过使用分段控件填充框架,您的意思是要添加分段控件作为具有特定框架的另一个视图的子视图,您可以这样做:

CGRect frame = CGRectMake(X_ORIGIN,Y_ORIGIN,WIDTH,HEIGHT);
UISegmentedControl * seg = [[UISegmentedControl alloc] initWithFrame:frame];
[viewYouWantToAddTheControlTo addSubview:seg];
[seg release];

这有帮助吗?

【讨论】:

  • 我想把分段的放在框架里
猜你喜欢
  • 2015-01-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-08-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多