ios - uiscrollview programmatically in autolayout -


enter image description here

i new auto layout concept. adding scroll view programmatically, works in ios 8 in ios 7 scroll view not working, can 1 me how can work?

uiscrollview *scroll = [[uiscrollview alloc]init]; [scroll settranslatesautoresizingmaskintoconstraints:no]; scroll.contentsize=cgsizemake(480, 700+100);  [contactview addsubview:scroll];  nsdictionary *scrolldic = @{@"scrollview":scroll}; nsarray *scroll_h = [nslayoutconstraint constraintswithvisualformat:@"h:[scrollview(480)]" options:0 metrics:nil views:scrolldic];  nsarray *scroll_v = [nslayoutconstraint constraintswithvisualformat:@"v:[scrollview(568)]" options:0 metrics:nil views:scrolldic];  [scroll addconstraints:scroll_h]; [scroll addconstraints:scroll_v];  nsarray *scroll_posh = [nslayoutconstraint constraintswithvisualformat:@"h:|-0-[scrollview]" options:0 metrics:nil views:scrolldic];  nsarray *scroll_posv = [nslayoutconstraint constraintswithvisualformat:@"v:|-140-[scrollview]" options:0 metrics:nil views:scrolldic];  [self.view addconstraints:scroll_posh]; [self.view addconstraints:scroll_posv]; 

is correct way set scroll view?

enter image description here


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -