Scrollview をビューコントローラーに配置しようとしていますか? 出来ますか?また、UIViewをScrollViewに配置したいと考えています。
UIScrollView *scrollView =[[UIScrollView alloc]initWithFrame:CGRectMake(20, 60, 280, 200)];
scrollView.contentSize = CGSizeMake(280, 200);
scrollView.backgroundColor=[UIColor orangeColor];
scrollView.delegate = self;
[self.view addSubview:scrollView];
UIView *container = [[UIView alloc] initWithFrame:CGRectMake(20, 60, 280, 200)];
container.backgroundColor = [UIColor whiteColor];
[scrollView addSubview:container];
このコードでは、scrollview を VC に配置しようとしましたが、View を ScrollView に配置しようとしました。
rb1 = [[RadioButton alloc] initWithGroupId:@"first group" index:j];
rb1.frame = CGRectMake(20,dy,22,22);
[container addSubview:rb1];
[rb1 release];
label1 =[[UILabel alloc] initWithFrame:CGRectMake(50, dy, 60, 20)];
label1.backgroundColor = [UIColor clearColor];
label1.text = [answers objectAtIndex:j];
[container addSubview:label1];
ここで、Viewにラジオボタンを配置しようとしました。
私はそれが明確であることを願っています:) 私の悪い英語を申し訳ありません.Thanks.