Giter Site home page Giter Site logo

Comments (11)

xhzengAIB avatar xhzengAIB commented on May 24, 2024

Hi! @ddcfcs
我不是很明白你的意思,如果你是想使用该组件的功能,那你得知道,你需要哪块功能,比如你只需要展示页面,展示的内容页面是用SB上初始化得到的。

from twitterpaggingviewer.

xhzengAIB avatar xhzengAIB commented on May 24, 2024

我说几个点吧!

1、你想要展示功能
2、你想要展示功能,而且能绑定某个页面是SB的控制器
3、如果你想要全部功能,我得写demo,

from twitterpaggingviewer.

ddcfcs avatar ddcfcs commented on May 24, 2024

好吧,我梳理一下
1.我先在SB上添加了一个UIViewController,然后Embed in一个UINavigationController;
2.在这个UIViewController上使用你的那个XHTableViewController(这个tvb实现了动态加载图片和title,就是答主展示的样子);
3,运行程序发现不能显示XHTableViewController

通过打断点发现没用运行到XHTableViewController.m里,为何会这样子?

from twitterpaggingviewer.

PonyCui avatar PonyCui commented on May 24, 2024

需要明确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.

ddcfcs avatar ddcfcs commented on May 24, 2024

什么意思啊?

from twitterpaggingviewer.

xhzengAIB avatar xhzengAIB commented on May 24, 2024

意思是让你确认SB里面的class是否对应写对了,不过我大概明白你的需求了,意思你想用SB来做界面,我大概可以写一个demo

from twitterpaggingviewer.

ddcfcs avatar ddcfcs commented on May 24, 2024

对的啊,我单独运行XHTableViewController 时(就是把SB的开始箭头放到XHTableViewController上 )可以显示的

from twitterpaggingviewer.

xhzengAIB avatar xhzengAIB commented on May 24, 2024

Hi!@ddcfcs @flymwy

算是解决了,但是你会发现没有UITabBarController那么好用,在SB的情况下,我问问崔神是否有好的办法。

可以看这个commit:68b2a4f

Jack

from twitterpaggingviewer.

ddcfcs avatar ddcfcs commented on May 24, 2024

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.

xhzengAIB avatar xhzengAIB commented on May 24, 2024

@ddcfcs
其实你应该要知道 addChildViewController方法的作用,你的view呢?add了吗?

from twitterpaggingviewer.

ddcfcs avatar ddcfcs commented on May 24, 2024

原来如此阿,多谢

from twitterpaggingviewer.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.