File tree Expand file tree Collapse file tree 2 files changed +24
-18
lines changed
WRNavigationBar_swift/WRNavigationBar_swift/WRNavigationBar Expand file tree Collapse file tree 2 files changed +24
-18
lines changed Original file line number Diff line number Diff line change @@ -971,15 +971,18 @@ public protocol WRFatherAwakeProtocol: class
971971class NothingToSeeHere
972972{
973973 static func harmlessFunction( ) {
974- let typeCount = Int ( objc_getClassList ( nil , 0 ) )
975- let types = UnsafeMutablePointer< AnyClass?> . allocate( capacity: typeCount)
976- let autoreleaseintTypes = AutoreleasingUnsafeMutablePointer < AnyClass > ( types)
977- objc_getClassList ( autoreleaseintTypes, Int32 ( typeCount) ) //获取所有的类
978- for index in 0 ..< typeCount {
979- ( types [ index] as? WRAwakeProtocol . Type) ? . wrAwake ( ) //如果该类实现了SelfAware协议,那么调用 awake 方法
980- ( types [ index] as? WRFatherAwakeProtocol . Type) ? . fatherAwake ( )
981- }
982- types. deallocate ( capacity: typeCount)
974+ // let typeCount = Int(objc_getClassList(nil, 0))
975+ // let types = UnsafeMutablePointer<AnyClass?>.allocate(capacity: typeCount)
976+ // let autoreleaseintTypes = AutoreleasingUnsafeMutablePointer<AnyClass>(types)
977+ // objc_getClassList(autoreleaseintTypes, Int32(typeCount)) //获取所有的类
978+ // for index in 0 ..< typeCount {
979+ // (types[index] as? WRAwakeProtocol.Type)?.wrAwake() //如果该类实现了SelfAware协议,那么调用 awake 方法
980+ // (types[index] as? WRFatherAwakeProtocol.Type)?.fatherAwake()
981+ // }
982+ // types.deallocate(capacity: typeCount)
983+ UINavigationBar . wrAwake ( )
984+ UIViewController . wrAwake ( )
985+ UINavigationController . fatherAwake ( )
983986 }
984987}
985988
Original file line number Diff line number Diff line change @@ -971,15 +971,18 @@ public protocol WRFatherAwakeProtocol: class
971971class NothingToSeeHere
972972{
973973 static func harmlessFunction( ) {
974- let typeCount = Int ( objc_getClassList ( nil , 0 ) )
975- let types = UnsafeMutablePointer< AnyClass?> . allocate( capacity: typeCount)
976- let autoreleaseintTypes = AutoreleasingUnsafeMutablePointer < AnyClass > ( types)
977- objc_getClassList ( autoreleaseintTypes, Int32 ( typeCount) ) //获取所有的类
978- for index in 0 ..< typeCount {
979- ( types [ index] as? WRAwakeProtocol . Type) ? . wrAwake ( ) //如果该类实现了SelfAware协议,那么调用 awake 方法
980- ( types [ index] as? WRFatherAwakeProtocol . Type) ? . fatherAwake ( )
981- }
982- types. deallocate ( capacity: typeCount)
974+ // let typeCount = Int(objc_getClassList(nil, 0))
975+ // let types = UnsafeMutablePointer<AnyClass?>.allocate(capacity: typeCount)
976+ // let autoreleaseintTypes = AutoreleasingUnsafeMutablePointer<AnyClass>(types)
977+ // objc_getClassList(autoreleaseintTypes, Int32(typeCount)) //获取所有的类
978+ // for index in 0 ..< typeCount {
979+ // (types[index] as? WRAwakeProtocol.Type)?.wrAwake() //如果该类实现了SelfAware协议,那么调用 awake 方法
980+ // (types[index] as? WRFatherAwakeProtocol.Type)?.fatherAwake()
981+ // }
982+ // types.deallocate(capacity: typeCount)
983+ UINavigationBar . wrAwake ( )
984+ UIViewController . wrAwake ( )
985+ UINavigationController . fatherAwake ( )
983986 }
984987}
985988
You can’t perform that action at this time.
0 commit comments