Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UIScrollView and UIPageControl within UITableView
- UITableViewCell *cell = [self.challengeListView dequeueReusableCellWithIdentifier:SubmitChallengeCellIdentifier];
- if(cell == nil){
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:SubmitChallengeCellIdentifier] autorelease];
- cell.frame = CGRectMake(0, 0, 1000, 50);
- }
- scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, tv.frame.size.width, 50)];
- [scrollView setContentSize:CGSizeMake(1000, 50)];
- [[cell contentView] addSubview:scrollView];
- pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(0, 50, tv.frame.size.width, 50)];
- [pageControl setNumberOfPages:4];
- [[cell contentView] addSubview:pageControl];
- - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
- {
- return 1;
- }
- -(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
- {
- return 1;
- }
- scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, tv.frame.size.width, 78)];
- UIImage *image = [UIImage imageNamed:@"dummy.png"];
- UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
- imageView.frame = CGRectMake(0, 0, 80, 78);
- [scrollView addSubview: imageView];
- [[cell contentView] addSubview:scrollView];
- pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(0, 50, tv.frame.size.width, 50)];
- [pageControl setNumberOfPages:4];
- [[cell contentView] addSubview:pageControl];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement