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

如何在 Storyboard 中的任何 ViewController 之外設計單

How to design separate UIView outside of any ViewController in Storyboard?(如何在 Storyboard 中的任何 ViewController 之外設計單獨的 UIView?)
本文介紹了如何在 Storyboard 中的任何 ViewController 之外設計單獨的 UIView?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我想設計一個 UIView,它比 Storyboard (iOS 5) 中的 ViewController 大.

I would like to design a UIView, which is larger than a ViewController in Storyboard (iOS 5).

UIView 應該用作 UIScrollView 的子視圖,因此比我現有的任何 ViewController 都大.如何在 Storyboard 中創建這樣的 UIView 并將其與我的 UIScrollView 關聯?

The UIView should be used as the subview of a UIScrollView and hence be larger than any of my existing ViewControllers. How can I create such a UIView in Storyboard and associate it with my UIScrollView?

如果可能,我希望不使用 xib 文件.

I would like to do this without xib files if possible.

謝謝!

推薦答案

除了使用 xibs,我沒有其他選擇,但它并不那么煩人:

I see no other option than using xibs, but it's not that annoying:

//We have file called "View.xib" in our project. It contains one SINGLE view
NSArray *xibContents = [[NSBundle mainBundle] loadNibNamed:@"View" owner:self options:nil];
UIView *view = [xibContents lastObject]; //safer than objectAtIndex:0

[self.scrollview addSubview:view];
self.scrollview.contentSize = view.frame.size; 

為了建立 IB 連接,您可以將 xib 中的 filesOwner 類設置為您的 viewController,然后像往常一樣連接.

In order to make IB connections you can set the filesOwner class in the xib to be your viewController, and connect like usual.

這篇關于如何在 Storyboard 中的任何 ViewController 之外設計單獨的 UIView?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

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 可縮放?)
UIImageView zoom and pinch in UIScrollView(UIImageView 在 UIScrollView 中縮放和捏合)
主站蜘蛛池模板: 欧美日韩a| 亚洲一区二区三区四区五区中文 | 国产一区二区三区免费 | 精品国产一区二区三区在线观看 | 国产黄色大片网站 | 日本成人免费网站 | 欧美黄视频 | www.日韩| 亚洲成人三级 | 日韩视频国产 | 午夜影院中文字幕 | 精品久久久久久久久久久久 | 国产精品福利在线 | 成人二区| 亚洲福利 | 成人在线观| 日韩一区二区三区精品 | 91亚洲国产成人久久精品网站 | www.国产91 | 中文字幕亚洲视频 | 午夜黄色影院 | 99re热这里只有精品视频 | 狠狠的干| 81精品国产乱码久久久久久 | 夜夜艹天天干 | 99精彩视频 | 一区二区三区小视频 | 久久精品亚洲精品国产欧美 | 特级黄色毛片 | 久久99精品久久 | 国产欧美日韩综合精品一区二区 | 97福利在线 | 久久精品免费 | 婷婷激情在线 | 国产欧美一区二区精品久导航 | 欧美6一10sex性hd | 精品96久久久久久中文字幕无 | 毛片在线免费 | 久久久亚洲一区 | 综合久久色 | 一区二区三区视频在线 |