我在故事板中分配自定义类时遇到问题。
在过去的项目中,我通过将UIPageControl.hZZPageControl添加到带有UIPageControl.
#import "MyPageControl.h"
@interface ScrollerVC : UIViewController <UIScrollViewDelegate> {
UIScrollView *scrollView;
IBOutlet MyPageControl *pageControl;
NSMutableArray *viewControllers;
BOOL pageControlUsed;
}
然后在 IB 中我分配我的自定义类而不是UIPageControl.
除了我的新项目使用故事板而不是单独的 XIB。在视图中选择UIPageControl并在 Identity Inspector 中检查其类时,仅UIPageControl列出。如果我输入MyPageControl不粘。
我尝试在 .pch 文件中添加#import "MyPageControl.h"应用程序委托,在启动控件的视图中。UINavigation我无法让我的自定义类显示在情节提要中。
如何覆盖UIPageControlStoryBoard 视图中的 ?