Note that there are some explanatory texts on larger screens.

plurals
  1. POscroller is not working(iphone)
    primarykey
    data
    text
    <p>I have added a scrollview to my view like following:</p> <pre><code> _scrollView = [[UIScrollView alloc] initWithFrame:self.view.frame]; _scrollView.contentSize = CGSizeMake(320, 600); [_scrollView setUserInteractionEnabled:TRUE]; [_scrollView setScrollEnabled:TRUE]; [container addSubview:self.scrollView]; </code></pre> <p>however the scroller shows up on the screen and I can scroll it but the texfields inside it are not working.How can I fix this?</p> <pre><code>- (UIView *)Form { if (!_Form) { CGRect frame = CGRectMake(0.0, kSignUpViewVisibleHeight, kDeviceWidth, 310.0); UIView *container = [[UIView alloc] initWithFrame:frame]; _scrollView = [[UIScrollView alloc] initWithFrame:self.view.frame]; _scrollView.contentSize = CGSizeMake(320, 600); [_scrollView setUserInteractionEnabled:TRUE]; [_scrollView setScrollEnabled:TRUE]; CGFloat y = 15.0; frame = CGRectMake(15.0, y, kDeviceWidth - 2*15.0, kDefaultTextFieldHeight); UITextField *field = [[UITextField alloc] initWithFrame:frame]; [self.appDel.styleManager decorateTextField:field]; field.placeholder = @"Email*"; field.keyboardType = UIKeyboardTypeEmailAddress; [container addSubview:field]; self.FormEmail = field; self.FormEmail.delegate = self; self.FormEmail.autocapitalizationType = UITextAutocapitalizationTypeNone; self.FormEmail.clearButtonMode = UITextFieldViewModeAlways; CGFloat spacing = 8.0; y = frame.origin.y + kDefaultTextFieldHeight + spacing; frame = CGRectMake(15.0, y, kDeviceWidth - 2*15.0, kDefaultTextFieldHeight); field = [[UITextField alloc] initWithFrame:frame]; [self.appDel.styleManager decorateTextField:field]; field.placeholder = @"Password*"; field.secureTextEntry = YES; [container addSubview:field]; self.FormPassword = field; self.FormPassword.delegate = self; self.FormPassword.autocapitalizationType = UITextAutocapitalizationTypeNone; self.FormPassword.clearButtonMode = UITextFieldViewModeAlways; y = frame.origin.y + kDefaultTextFieldHeight + spacing; frame = CGRectMake(15.0, y, kDeviceWidth - 2*15.0, kDefaultTextFieldHeight); field = [[UITextField alloc] initWithFrame:frame]; [self.appDel.styleManager decorateTextField:field]; field.placeholder = @"Confirm Password*"; field.secureTextEntry = YES; [container addSubview:field]; self.FormConfirmPassword = field; self.FormConfirmPassword.delegate = self; self.FormConfirmPassword.autocapitalizationType = UITextAutocapitalizationTypeNone; self.FormConfirmPassword.clearButtonMode = UITextFieldViewModeAlways; y = frame.origin.y + kDefaultTextFieldHeight + 16.0; CGFloat w = (kDeviceWidth - 2 * 15.0) / 2; frame = CGRectMake(15.0, y, w - 2.0, kDefaultTextFieldHeight); field = [[UITextField alloc] initWithFrame:frame]; [self.appDel.styleManager decorateTextField:field]; field.placeholder = @"First Name*"; [container addSubview:field]; self.FirstName = field; self.FirstName.delegate = self; self.FirstName.clearButtonMode =UITextFieldViewModeAlways; frame = CGRectMake(15.0 + w + 2.0, y, w - 2.0, kDefaultTextFieldHeight); field = [[UITextField alloc] initWithFrame:frame]; [self.appDel.styleManager decorateTextField:field]; field.placeholder = @"Last Name*"; [container addSubview:field]; self.FormLastName = field; self.FormLastName.delegate = self; self.FormLastName.clearButtonMode =UITextFieldViewModeAlways; y = frame.origin.y + kDefaultTextFieldHeight + spacing; frame = CGRectMake(15.0, y, w, kDefaultTextFieldHeight); field = [[UITextField alloc] initWithFrame:frame]; [self.appDel.styleManager decorateTextField:field]; field.placeholder = @"Birthday"; [container addSubview:field]; self.FormBirthday = field; self.FormBirthday.delegate = self; frame = CGRectMake(15.0 + w + 5.0, y, w - 5.0, kDefaultTextFieldHeight); SegmentControl *gender = [[SegmentControl alloc] initWithFrame:frame items:@[@"Boy", @"Girl"]]; [container addSubview:gender]; self.Formtype = gender; y = frame.origin.y + kDefaultTextFieldHeight + 20.0; frame = CGRectMake((container.frame.size.width - 192.0) / 2, y, 192.0, 33.0); UIButton *signUpButton = [UIButton buttonWithType:UIButtonTypeCustom]; signUpButton.frame = frame; [signUpButton setTitle:@"Sign Up" forState:UIControlStateNormal]; [self.appDel.styleManager decorateButton:signUpButton]; [container addSubview:signUpButton]; y = frame.origin.y + kDefaultTextFieldHeight + 8.0; frame = CGRectMake((container.frame.size.width - 192.0) / 2, y, 192.0, 34.0); UIButton *cancelButton = [UIButton buttonWithType:UIButtonTypeCustom]; cancelButton.frame = frame; [cancelButton setTitle:@"Cancel" forState:UIControlStateNormal]; [self.appDel.styleManager decorateButton:cancelButton]; [cancelButton addTarget:self action:@selector(cancelRegistration:) forControlEvents:UIControlEventTouchUpInside]; [container addSubview:cancelButton]; [container addSubview:self.scrollView]; _Form = container; } return _Form; } </code></pre> <p>I have added the form that needs to be scrolled.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload