Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Zolta

macrumors newbie
Original poster
Nov 21, 2011
3
0
Hi!
I'm trying to build an application where you can pick something from a tableview that leads to another view where you can switch between texts with PageControl.
I have no problem with these 2 things separately. So, I can make a TableView lead to an other view, and I also can build an app with PageControl.
But I've just couldn't make them together yet.

Do you have any idea how to do that?
The TableView pushes to a UIViewControllerSubclass, while the PageControl should be an Object class, and I think these two just don't pass together.
What should I change?
So basically, the new view is a UIViewControllerSubClass, while the page controller looks something like this...

Code:
@interface PageControlExampleAppDelegate : [B]NSObject[/B] <UIApplicationDelegate , UIScrollViewDelegate> {
    UIWindow *window;
	IBOutlet UIScrollView *scrollView;
    IBOutlet UIPageControl *pageControl;
    NSMutableArray *viewControllers;
    BOOL pageControlUsed;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) UIScrollView *scrollView;
@property (nonatomic, retain) UIPageControl *pageControl;
@property (nonatomic, retain) NSMutableArray *viewControllers;

- (IBAction)changePage:(id)sender;

@end

Anything could help. Thank you.
(Sorry if it's a lame question, I'm quite new to this)
 
You should move the scrollView and pageControl out of the appDelegate, which isn't meant for this purpose, and into their own viewController. Then it will be rather trivial to transition to it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.