久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

為什么添加對象后 UIScrollView 不會完全滾動?使用

Why won#39;t UIScrollView scroll fully after adding objects? Using storyboard, ARC, and Xcode 4.5.2(為什么添加對象后 UIScrollView 不會完全滾動?使用故事板、ARC 和 Xcode 4.5.2)
本文介紹了為什么添加對象后 UIScrollView 不會完全滾動?使用故事板、ARC 和 Xcode 4.5.2的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

所以,我知道我有類似的問題,但可能不準確(所以請不要標記我——只是警告我或其他什么).我已經搜索了幾天來解決這個簡單的問題.使用故事板、ARC 和 Xcode 4.5.2,我只需將一堆標簽放在 UIScrollView 中并讓它垂直滾動.我已經嘗試過在 viewDidLoad、viewDidAppear 和 viewWillAppear 中設置幀大小和內容大小的多種組合,但無濟于事.當里面沒有任何東西時,滾動視圖可以完美滾動,但是當我給它添加標簽時,滾動只會滾動很短的部分.

So, I know there are similar questions to mine, but maybe not exact (so please don't mark me down -- just warn me or something). I have searched for days for the solution to this SIMPLE issue. Using storyboards, ARC, and Xcode 4.5.2, I simply need to put a bunch of labels inside a UIScrollView and have it scroll vertically. I've tried so many combinations of setting frame sizes and content sizes within viewDidLoad, viewDidAppear, and viewWillAppear, but to no avail. The scroll view scrolls perfectly when there's nothing inside of it, but when I add labels to it, the scrolling only scrolls a very short section.

注意:我需要使用自動布局,否則我的整個項目都會搞砸.

Note: I need to use auto layout, otherwise my whole project will get messed up.

這是我當前的代碼...

Here's my current code...

.h 文件:

#import <UIKit/UIKit.h>

@interface MortgageRatesViewController : UIViewController <UIScrollViewDelegate, UIScrollViewAccessibilityDelegate>

- (IBAction)backButton:(id)sender;

@property (strong, nonatomic) IBOutlet UIView *mortgageView;

@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;

@end

.m 文件:

#import "MortgageRatesViewController.h"


@interface MortgageRatesViewController ()

@end

@implementation MortgageRatesViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

//-------------------------------------------------------

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.

    self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"appBackgroundColor.png"]];


    [self.scrollView setScrollEnabled:YES];
    [self.scrollView setContentSize:CGSizeMake(0, 809)];



}

//---------------------------------------------------------------

//---------------------------------------------------------------

//-(void)viewWillAppear:(BOOL)animated{
//    
//    
//    [super viewWillAppear:animated];
//    
//    
//    [self.scrollView setFrame:CGRectMake(0, 0, 320, 808)];   
//
//    
/
                
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

how to set scrollview content size in swift 3.0(如何在 swift 3.0 中設置滾動視圖內容大小)
Stop a UITableView from automatically scrolling(阻止 UITableView 自動滾動)
iOS UIScrollView Lazy Loading(iOS UIScrollView 延遲加載)
using iOS 6.0 SDK and building for iOS 5 Target causes UIScrollView setMinimumZoomScale to fail when running on iOS 5 simulator(在 iOS 5 模擬器上運行時,使用 iOS 6.0 SDK 并為 iOS 5 Target 構建會導致 UIScrollView setMinimumZ
Create partial-screen UIPageViewController programmatically(以編程方式創建部分屏幕 UIPageViewController)
how to make an ImageView zoomable with or without ScrollView.?(如何使用或不使用 ScrollView 使 ImageView 可縮放?)
主站蜘蛛池模板: 精品真实国产乱文在线 | 神马久久av| 97日日碰人人模人人澡分享吧 | 精品一区二区久久久久久久网精 | 精品三区| 色视频一区二区 | 欧美在线视频一区 | 亚洲视频免费观看 | 久久亚洲欧美日韩精品专区 | 国产成人99久久亚洲综合精品 | 国产精品久久久久久久久久尿 | 日韩中文字幕网 | 91久久精品一区 | 精品一区二区久久 | 国产精品久久国产精品 | 国产一区视频在线 | 欧美一区二不卡视频 | 久久伊人精品 | 在线日韩| 天堂一区二区三区 | 亚洲国产欧美在线人成 | 国产精品成人国产乱一区 | 免费国产一区二区 | 亚洲精品在线视频 | 久久久久久黄 | 999久久久| 久久亚洲欧美日韩精品专区 | 在线播放国产一区二区三区 | 美女爽到呻吟久久久久 | 精品久久国产 | 日本成人在线观看网站 | 成人免费视频在线观看 | 日本免费在线看 | 久久中文字幕电影 | 亚洲午夜精品一区二区三区 | 日本高清视频在线播放 | 人人干人人干人人干 | 美女在线视频一区二区三区 | 亚洲美女网站 | 日韩三级免费观看 | 欧美成人精品激情在线观看 |