How to create a UIScrollView Programmatically?

后端 未结 7 1074
后悔当初
后悔当初 2020-11-30 23:38

Alright, so the key here is I\'m not using IB at all, because the View I\'m working with is created programmatically. The UIView covers the lower half the scre

相关标签:
7条回答
  • 2020-12-01 00:22

    Instead of:

    UIScrollView *scroll = [UIScrollView alloc];
    

    do this (setting the frame to however big you want the scroll view to be):

    UIScrollView *scroll = [[UIScrollView alloc] initWithFrame:...];
    
    0 讨论(0)
提交回复
热议问题