UiIScrollView

Discussion in 'iOS Programming' started by Nnavick, Dec 27, 2010.

  1. Nnavick, Dec 27, 2010
    Last edited: Dec 27, 2010

    Nnavick macrumors regular

    Joined:
    Oct 13, 2010
    #1
    Hi,
    Why when I am trying to put UIScrollView in another UIScrollView the second ScrollView isn't working?
    I tries to change the attributes ,but it's hasn't succeed.

    Thank you!!
     
  2. nickculbertson macrumors regular

    nickculbertson

    Joined:
    Nov 19, 2010
    Location:
    Nashville, TN
    #2
    are both scrollviews connected to their own IBOutlets? Is one scrollview inside the other or are they both on the UIView? What are you trying to achieve?
    Nick
     
  3. Nnavick thread starter macrumors regular

    Joined:
    Oct 13, 2010
    #3
    I am trying to locate UIScrollView in another one
    I used the IBACTIONS

    Code:
    	IBOutlet UIScrollView *SCV;
    	IBOutlet UIScrollView *SCV1;
    Still don't working
     
  4. nickculbertson macrumors regular

    nickculbertson

    Joined:
    Nov 19, 2010
    Location:
    Nashville, TN
    #4
    Post some code and maybe we can find the problem but I suspect your error is in interface builder.

    your .h should be something like
    Code:
    @interface Flipside : UIViewController {
    	IBOutlet UIScrollView *scrollView;
    	IBOutlet UIScrollView *scrollView2;
    } 
    
    @property (nonatomic, retain) IBOutlet UIScrollView *scrollView;
    @property (nonatomic, retain) IBOutlet UIScrollView *scrollView2;
    
    @end
    
    your .m

    Code:
    @synthesize scrollView;
    @synthesize scrollView2;
    
    - (void)viewDidLoad { 
     [scrollView setScrollEnabled:YES];	
     [scrollView setContentSize:CGSizeMake(320.0,780.0)];
     [scrollView setPagingEnabled:YES];
     [scrollView2 setScrollEnabled:YES];
     [scrollView2 setContentSize:CGSizeMake(9984.0,460.0)];
     [scrollView2 setPagingEnabled:YES];
     [super viewDidLoad];
     }
    
    - (void)dealloc {
        [scrollView release];
        [scrollView2 release];
        [super dealloc];
    }
    
    
    
    at the interface drag over a scrollview and connect it to scrollView. Drag another scrollview inside the first one and connect it to scrollView2.

    Nick
     
  5. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #5
    Those aren't IBActions. It would help if you understood the difference.
     

Share This Page