Comments (11)
Hi! @ddcfcs
我不是很明白你的意思,如果你是想使用该组件的功能,那你得知道,你需要哪块功能,比如你只需要展示页面,展示的内容页面是用SB上初始化得到的。
from twitterpaggingviewer.
我说几个点吧!
1、你想要展示功能
2、你想要展示功能,而且能绑定某个页面是SB的控制器
3、如果你想要全部功能,我得写demo,
from twitterpaggingviewer.
好吧,我梳理一下
1.我先在SB上添加了一个UIViewController,然后Embed in一个UINavigationController;
2.在这个UIViewController上使用你的那个XHTableViewController(这个tvb实现了动态加载图片和title,就是答主展示的样子);
3,运行程序发现不能显示XHTableViewController
通过打断点发现没用运行到XHTableViewController.m里,为何会这样子?
from twitterpaggingviewer.
需要明确sb中是否已经继承正确
发自我的 iPhone
在 2014年7月1日,下午11:02,ddcfcs [email protected] 写道:
好吧,我梳理一下
1.我先在SB上添加了一个UIViewController,然后Embed in一个UINavigationController;
2.在这个UIViewController上使用你的那个XHTableViewController(这个tvb实现了动态加载图片和title,就是答主展示的样子);
3,运行程序发现不能显示XHTableViewController通过打断点发现没用运行到XHTableViewController.m里,为何会这样子?
—
Reply to this email directly or view it on GitHub.
from twitterpaggingviewer.
什么意思啊?
from twitterpaggingviewer.
意思是让你确认SB里面的class是否对应写对了,不过我大概明白你的需求了,意思你想用SB来做界面,我大概可以写一个demo
from twitterpaggingviewer.
对的啊,我单独运行XHTableViewController 时(就是把SB的开始箭头放到XHTableViewController上 )可以显示的
from twitterpaggingviewer.
Hi!@ddcfcs @flymwy
算是解决了,但是你会发现没有UITabBarController那么好用,在SB的情况下,我问问崔神是否有好的办法。
可以看这个commit:68b2a4f
Jack
from twitterpaggingviewer.
1.根据答主的提示,我在AppDelegate里运行的是这个代码
UINavigationController navigationController = (UINavigationController *)self.window.rootViewController;
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main_iPhone" bundle:nil];
XHTableViewController *tableViewController1 = [storyboard instantiateViewControllerWithIdentifier:@"XHTVC"];
tableViewController1.title = @"Home";
UIViewController *viewcontroller = (UIViewController *)navigationController.topViewController;
[viewcontroller addChildViewController:tableViewController1];
运行没有显示TVC
2. 我又放在UINavigationController 里的uiviewcontroller的viewDidLoad里,
UIStoryboard mainStoryboard = [UIStoryboard storyboardWithName:@"Main_iPhone" bundle:nil];
XHTableViewController *tableViewController = [mainStoryboard instantiateViewControllerWithIdentifier:@"XHTVC"];
[self addChildViewController:tableViewController];
意思就是在这里加载上SB里的TVC,为什么运行还是会没效果呢
from twitterpaggingviewer.
@ddcfcs
其实你应该要知道 addChildViewController方法的作用,你的view呢?add了吗?
from twitterpaggingviewer.
原来如此阿,多谢
from twitterpaggingviewer.
Related Issues (11)
- Problem with scrolling in tableview HOT 1
- unrecognized selector HOT 12
- exc_bad_instruction (code=exc_i386_invop subcode=0x0)
- 请问这个初始化带有左右滑动菜单的Viewer控制器什么意思啊 HOT 5
- 添加uipagecontrol失败了 ~~
- Start from the second view controller: 您好,您可以通过2的ViewController开始? HOT 4
- circular scrolling ( 循环滚动 ) HOT 9
- UITableView goes under the navigation bar with xib HOT 1
- Method to go directly in a specific page HOT 2
- How to add Navigation bar button item when use your code in project. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twitterpaggingviewer.