目前 HLBFocusedWithDialogManager 和 HLBFocusedWithDialogViewController 是强耦合的,其实可以把 manager 写的更通用,使其能承载各种自定义的引导页面。实施方法:
- 将
HLBFocusedWithDialogManager 重命名为 HLBGuideManager;
- 内部的
-addFocusedWithDialogVC: 方法改为 -addGuideViewController:,并接受 UIViewController 类型的参数;
- manager 内部使用的
HLBFocusedWithDialogViewController 类型全改为 UIViewController 类型。
这样,HLBFocusedWithDialogViewController 就只作为一种引导页类型出现。以后,可以不断地往本库中添加各种类型的引导页面以满足不同的需求。
如果已有的引导页类型无法满足需求,用户也可以很方便地新建自定义的引导页面,并交由 HLBGuideManager 管理。
目前
HLBFocusedWithDialogManager和HLBFocusedWithDialogViewController是强耦合的,其实可以把 manager 写的更通用,使其能承载各种自定义的引导页面。实施方法:HLBFocusedWithDialogManager重命名为HLBGuideManager;-addFocusedWithDialogVC:方法改为-addGuideViewController:,并接受UIViewController类型的参数;HLBFocusedWithDialogViewController类型全改为UIViewController类型。这样,
HLBFocusedWithDialogViewController就只作为一种引导页类型出现。以后,可以不断地往本库中添加各种类型的引导页面以满足不同的需求。如果已有的引导页类型无法满足需求,用户也可以很方便地新建自定义的引导页面,并交由
HLBGuideManager管理。