agdsdl / DLSlideView

Tabed slide view based on container of ViewController(not UIScrollView). Support infinite pages.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

纯代码实现的版本

lianghuiyuan opened this issue · comments

你好,非常感谢你贡献的代码,请问一下,是否有意提供一个纯代码实现的版本demo呢?
我用纯代码实现的时候,实现Demo1ViewController.h中的“@Property (weak, nonatomic) IBOutlet DLTabedSlideView *tabedSlideView;”时遇到一个问题,tabedSlideView如何同时具有XIB的UITabBarController属性.呢?

commented

我用纯代码实现时发现会报错。DLTabedSlideView的 init*方法都没返回实例

"init*方法都没返回实例" 能说清楚点吗?

commented

就是说这些 init 开头的方法并没返回 instancetype;

另外,我采用纯代码实现时,无法显示 DLSlideView。
在 2016年4月12日 18:42:26, agdsdl (notifications@github.com) 写到:

"init*方法都没返回实例" 能说清楚点吗?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub

init 没返回 instancetype 的情况我没遇到过,一般是内存不足才会出现。
如果不是这种情况的话,可能是你init调用的地方有问题。你可以贴下你的代码。

commented

当我用纯代码实现时,到这一句就挂了。

以下是实例化的代码:

-- 
邓波
Sent with Airmail

在 2016年4月14日 21:08:43, agdsdl (notifications@github.com) 写到:

init 没返回 instancetype 的情况我没遇到过,一般是内存不足才会出现。
如果不是这种情况的话,可能是你init调用的地方有问题。你可以贴下你的代码。


You are receiving this because you commented.
Reply to this email directly or view it on GitHub

你好,我在代码实现UI的时候也遇到了问题:
完成一系列配置后,运行到**self.tabedSlideView.selectedIndex = 0;**这里的时候,会报:
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
找不到原因@@

模仿demo的代码调用,注意一点就是demo中的delegate属性是在xib文件中设置的,如果纯代码实现的话,需要代码设置一下delegate

果然是没有注意到代理。非常感谢

commented

纯代码调用时,引用的DLTabedSlideView一直为nil,不能显示,能详细告知下原因吗?万分感谢