久久久久久久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 可縮放?)
主站蜘蛛池模板: 欧美一级高潮片免费的 | 亚洲精品在线免费播放 | 美女黄网| 久在线视频播放免费视频 | 成人久久久 | 久久中文视频 | 国产欧美性成人精品午夜 | 亚洲天堂999| 成人免费影院 | 日韩视频二区 | 国产精品成人免费 | 在线观看中文字幕av | 黄色免费av | 欧美一区二区三区四区五区无卡码 | 老妇激情毛片免费 | 久久99精品久久久久子伦 | 色嗨嗨 | 国产精品自产拍在线观看蜜 | 91影院 | h片在线看| 一二三四在线视频观看社区 | 久久中文一区二区 | 亚洲综合精品 | 99热播放 | 亚洲午夜精品视频 | 国产成人精品a视频一区www | 日韩一二三区视频 | 中国av在线免费观看 | 国产最新网址 | 亚洲区一区二 | 午夜男人免费视频 | 日日av| 一级毛片在线播放 | 九九国产 | 国产精品免费观看 | 韩日一区二区三区 | www.国产 | 亚洲有码转帖 | 亚洲美女一区二区三区 | 亚洲国产精品va在线看黑人 | 天堂色综合 |