关于如何向我的视图控制器添加额外的 40 个圆形矩形按钮的任何建议......我已经尝试通过情节提要来做到这一点,但当然你可以理解唯一可编辑的空间是视图控制器中可见的空间。
所以我认为我必须使用代码添加额外的 40 个圆形矩形按钮,这些按钮是可编辑的,以便我可以重命名它们,也可以将插座链接到每个单独的插座,因为每个插座都将播放单独的短视频。
另外我选择按钮而不是表格视图的原因是因为这个视图控制器将通过我的“应用内购买”购买来访问,希望能够模糊/停用一些按钮/购买,如果它们还没有被购买. 或者表格视图也可以这样做吗?
这是我用于滚动视图的 .h 文件的代码
@interface ViewController17 : UIViewController <UIScrollViewDelegate> {
IBOutlet UIScrollView *scroller1;
}
@property (nonatomic, strong) UIScrollView *scroller1;
@end
这是我用于滚动视图的 .m 文件的代码
@implementation ViewController17
@synthesize scroller1;
- (void)viewDidLoad {
[scroller1 setScrollEnabled:YES];
[scroller1 setContentSize:CGSizeMake(320, 4000)];
scroller1.maximumZoomScale = 4.0;
scroller1.minimumZoomScale = 0.75;
scroller1.clipsToBounds = YES;
//here is the delegate portion below
scroller1.delegate = self;
[self.view bringSubviewToFront:scroller1];
[super viewDidLoad];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end