Приватные методы для отладки29.06.2014 02:33
Наверняка уже все знают, что у UIView есть полезный метод recursiveDescription.Вызов которого, вернет строку с описанием всей иерархии вью.
(lldb) po [[self view] recursiveDescription]
(lldb) po [UIApplication _methodDescription]
:
in UIApplication:
Class Methods:
+ (BOOL) registerAsSystemApp; (0×2378c5)
+ (BOOL) rendersLocally; (0×2378d7)
+ (void) _startWindowServerIfNecessary; (0×230e26)
+ (void) _startStatusBarServerIfNecessary; (0×230f9a)
+ (int) statusBarStyleForString:(id)arg1; (0×23c19d)
+ (int) _backgroundStyleForString:(id)arg1; (0×23c39e)
+ (BOOL) _isBackgroundStyleTransparent:(int)arg1; (0×23c4e0)
+ (int) interfaceOrientationForString:(id)arg1; (0×23c4ef)
+ (BOOL) isRunningInStoreDemoMode; (0×22abcb)
+ (BOOL) shouldMakeUIForDefaultPNG; (0×22ac29)
+ (void) _noteInterfaceOrientationChangingTo:(int)arg1; (0×22be17)
+ (void) _installAfterCACommitHandler; (0×22d45f)
+ (BOOL) _isAfterCACommitHandlerInstalled; (0×22d512)
+ (BOOL) isRunningEventPump; (0×237848)
+ (id) stringForStatusBarStyle:(int)arg1; (0×23c169)
+ (id) stringForInterfaceOrientation:(int)arg1; (0×23c5d9)
+ (void) registerObjectForStateRestoration:(id)arg1 restorationIdentifier:(id)arg2; (0×8e6863)
+ (id) sharedApplication; (0×22a2b0)
Properties:
@property (nonatomic, getter=isProximitySensingEnabled) BOOL proximitySensingEnabled;
@property (nonatomic) * delegate;
@property (nonatomic, getter=isIdleTimerDisabled) BOOL idleTimerDisabled;
@property (readonly, nonatomic) UIWindow* keyWindow;
@property (readonly, nonatomic) NSArray* windows;
@property (nonatomic, getter=isNetworkActivityIndicatorVisible) BOOL networkActivityIndicatorVisible;
@property (nonatomic) int statusBarStyle;
@property (nonatomic, getter=isStatusBarHidden) BOOL statusBarHidden;
@property (nonatomic) int statusBarOrientation;
@property (readonly, nonatomic) double statusBarOrientationAnimationDuration;
@property (readonly, nonatomic) CGRect statusBarFrame;
@property (nonatomic) int applicationIconBadgeNumber;
@property (nonatomic) BOOL applicationSupportsShakeToEdit;
@property (readonly, nonatomic) int applicationState;
@property (readonly, nonatomic) double backgroundTimeRemaining;
@property (readonly, nonatomic) int backgroundRefreshStatus;
@property (readonly, nonatomic, getter=isProtectedDataAvailable) BOOL protectedDataAvailable;
@property (readonly, nonatomic) int userInterfaceLayoutDirection;
@property (readonly, nonatomic) NSString* preferredContentSizeCategory;
@property (copy, nonatomic, setter=_setPreferredContentSizeCategoryName:) NSString* preferredContentSizeCategoryName; (@synthesize preferredContentSizeCategoryName = _preferredContentSizeCategoryName;)
@property (nonatomic, getter=_lastTimestampWhenFirstTouchCameDown, setter=_setLastTimestampWhenFirstTouchCameDown:) double lastTimestampWhenFirstTouchCameDown; (@synthesize lastTimestampWhenFirstTouchCameDown = _lastTimestampWhenFirstTouchCameDown;)
@property (nonatomic, getter=_lastTimestampWhenAllTouchesLifted, setter=_setLastTimestampWhenAllTouchesLifted:) double lastTimestampWhenAllTouchesLifted; (@synthesize lastTimestampWhenAllTouchesLifted = _lastTimestampWhenAllTouchesLifted;)
@property (nonatomic, getter=_lastLocationWhereFirstTouchCameDown, setter=_setLastLocationWhereFirstTouchCameDown:) CGPoint lastLocationWhereFirstTouchCameDown; (@synthesize lastLocationWhereFirstTouchCameDown = _lastLocationWhereFirstTouchCameDown;)
@property (nonatomic, getter=_lastLocationWhereAllTouchesLifted, setter=_setLastLocationWhereAllTouchesLifted:) CGPoint lastLocationWhereAllTouchesLifted; (@synthesize lastLocationWhereAllTouchesLifted = _lastLocationWhereAllTouchesLifted;)
Instance Methods:
— (int) statusBarOrientation; (0×236147)
— (int) alertInterfaceOrientation; (0×247f45)
— (void) startedTest:(id)arg1; (0×38e6ce)
— (void) finishedTest:(id)arg1; (0×390a59)
— (id) _touchesEvent; (0×23d94f)
— (void) setApplicationSupportsShakeToEdit:(BOOL)arg1; (0×23bf31)
— (void) _deactivateForReason:(int)arg1 notify:(BOOL)arg2; (0×22b8f8)
— (void) _fetchInfoPlistFlags; (0×23c7f0)
— (void) _setTextLegibilityEnabled:(BOOL)arg1; (0×249882)
— (id) _mainStoryboardName; (0×22bf4d)
— (BOOL) _doRestorationIfNecessary; (0×249d5d)
— (void) applicationWillSuspend; (0×23752b)
— (void) _setHandlingURL:(BOOL)arg1 url:(id)arg2; (0×23a36a)
— (BOOL) _handleDelegateCallbacksWithOptions:(id)arg1 isSuspended:(BOOL)arg2 restoreState:(BOOL)arg3; (0×22c01a)
— (BOOL) _hasStoryboard; (0×22bfd8)
— (void) _applicationOpenURL:(id)arg1 payload:(id)arg2; (0×23a1b8)
…
in UIResponder:
Class Methods:
+ (void) _startDeferredTrackingObjectsWithIdentifiers; (0×8e8348)
+ (void) _cleanupAllStateRestorationTables; (0×8e85dc)
+ (void) _updateStateRestorationIdentifierMap; (0×8e836c)
+ (id) objectWithRestorationIdentifierPath:(id)arg1; (0×8e802c)
+ (void) _setRestoredIdentifierPathForObject:(id)arg1 identifierPath:(id)arg2; (0×8e844d)
+ (void) _prepareForSecondPassStateRestoration; (0×8e85b6)
+ (void) _finishStateRestoration; (0×8e8644)
+ (void) clearTextInputContextIdentifier:(id)arg1; (0×398751)
+ (void) _stopDeferredTrackingObjectsWithIdentifiers; (0×8e835a)
+ (void) _cleanupStateRestorationObjectIdentifierTrackingTables; (0×8e856c)
Properties:
@property (readonly) UIView* inputView;
@property (readonly) UIView* inputAccessoryView;
@property (readonly) UITextInputMode* textInputMode;
@property (readonly) NSString* textInputContextIdentifier;
@property (readonly, nonatomic) NSArray* keyCommands;
@property (readonly, nonatomic) UIResponder* _editingDelegate;
@property (readonly, nonatomic) UIResponder* _responderForEditing;
@property (readonly, nonatomic, getter=_proxyTextInput) UIResponder* __content;
@property (readonly, nonatomic) UIView* _textSelectingContainer;
@property (readonly, nonatomic, getter=isEditable) BOOL editable;
@property (readonly, nonatomic, getter=isEditing) BOOL editing;
@property (readonly, nonatomic, getter=_caretRect) CGRect caretRect;
@property (copy, nonatomic) NSString* restorationIdentifier;
@property (readonly, nonatomic) NSUndoManager* undoManager;
Instance Methods:
— (id) _responderForEditing; (0×397e74)
— (BOOL) canPerformAction:(SEL)arg1 withSender:(id)arg2; (0×3983fc)
— (id) targetForAction:(SEL)arg1 withSender:(id)arg2; (0×39842c)
— (void) _physicalButtonsBegan:(id)arg1 withEvent:(id)arg2; (0×3996d6)
— (id) _deepestUnambiguousResponder; (0×39973f)
— (void) touchesCancelled:(id)arg1 withEvent:(id)arg2; (0×397b37)
— (id) _keyCommandForEvent:(id)arg1; (0×398bab)
— (void) _handleKeyUIEvent:(id)arg1; (0×399183)
— (void) _handleKeyEvent:(__GSEvent*)arg1; (0×399142)
— (void) _wheelChangedWithEvent:(id)arg1; (0×397cb7)
— (void) _physicalButtonsEnded:(id)arg1 withEvent:(id)arg2; (0×3996f9)
— (void) _physicalButtonsCancelled:(id)arg1 withEvent:(id)arg2; (0×39971c)
— (void) motionEnded:(int)arg1 withEvent:(id)arg2; (0×397bb3)
— (id) keyCommands; (0×398a39)
— (id) textInputMode; (0×398615)
…
in NSObject:
Class Methods:
+ (void) _installAppearanceSwizzlesForSetter:(id)arg1; (0×78d82c)
+ (BOOL) __accessibilityGuidedAccessStateEnabled; (0×539dac)
+ (int) __accessibilityGuidedAccessRestrictionStateForIdentifier:(id)arg1; (0×539db3)
+ (void) __accessibilityRequestGuidedAccessSession:(BOOL)arg1 completion:(^block)arg2; (0×539dba)
+ (id) _alternateUISwitchableSelectorPairs; (0×3f929b)
+ (BOOL) isSelectorExcludedFromWebScript:(SEL)arg1; (0×42b5c40)
+ (BOOL) isKeyExcludedFromWebScript:(const char*)arg1; (0×42b5c50)
+ (id) _webkit_invokeOnMainThread; (0×42a4d90)
__methodDescriptionForClass — список методов, реализованных в конкретном классе, без учета базовых классов
(lldb) po [NSObject __methodDescriptionForClass:[NSString class]]
in NSString:
Class Methods:
+ (void) _web_setWordRoundingEnabled:(BOOL)arg1; (0×42a4e50)
+ (BOOL) _web_wordRoundingEnabled; (0×42a4ea0)
+ (void) _web_setWordRoundingAllowed:(BOOL)arg1; (0×42a4ec0)
+ (BOOL) _web_wordRoundingAllowed; (0×42a4ee0)
+ (void) _web_setAscentRoundingEnabled:(BOOL)arg1; (0×42a4f00)
+ (BOOL) _web_ascentRoundingEnabled; (0×42a4f20)
+ (id) _webkit_localCacheDirectoryWithBundleIdentifier:(id)arg1; (0×42a0660)
+ (id) _web_stringWithData:(id)arg1 textEncodingName:(id)arg2; (0×42a0620)
+ (float) defaultLineHeightForFont:(id)arg1; (0×2e79478)
+ (float) defaultBaselineOffsetForFont:(id)arg1; (0×2e794ce)
+ (int) typesetterBehavior; (0×2e79389)
+ (float) hyphenationFactor; (0×2e79339)
+ (BOOL) usesFontLeading; (0×2e78f52)
+ (void) setUsesFontLeading:(BOOL)arg1; (0×2e78fa3)
+ (void) setTypesetterBehavior:(int)arg1; (0×2e793ed)
+ (BOOL) usesScreenFonts; (0×2e7901f)
+ (void) setUsesScreenFonts:(BOOL)arg1; (0×2e79089)
+ (void) setShowsInvisibleCharacters:(BOOL)arg1; (0×2e7911f)
+ (BOOL) showsInvisibleCharacters; (0×2e7919e)
+ (void) setShowsControlCharacters:(BOOL)arg1; (0×2e791f2)
+ (BOOL) showsControlCharacters; (0×2e79271)
+ (void) setHyphenationFactor:(float)arg1; (0×2e792c5)
+ (id) copyStringGUID; (0×7f54e23)
+ (id) copyStringGUIDForObject:(id)arg1; (0×7f54eee)
+ (id) stringGUID; (0×7f54e73)
+ (id) stringGUIDForObject:(id)arg1; (0×7f54ead)
+ (id) randomString; (0×7f54f14)
+ (id) generatedRoomNameForGroupChat; (0×7f54fa6)
+ (id) sbs_stringFromCGRect:(CGRect)arg1; (0×3d84171)
+ (id) stringWithUnichar:(unsigned long)arg1; (0×3fa6420)
+ (USet*) _characterSetWithPattern:(id)arg1; (0×3fa3bbc)
+ (id) _stringWithUnichar:(unsigned long)arg1; (0×3fa3a52)
+ (USet*) _ideographSet; (0×3fa40c1)
+ (USet*) _japaneseLetterSet; (0×3fa3fc1)
+ (USet*) _nonIdeographicCharacterSet; (0×3fa3cc9)
+ (USet*) _nonHiraganaOrKatakanaSet; (0×3fa3dc1)
+ (USet*) _nonHiraganaKatakanaOrBopomofoSet; (0×3fa3ec1)
+ (USet*) _bopomofoSet; (0×3fa41c1)
+ (USet*) _bopomofoToneSet; (0×3fa42c1)
+ (id) cutStringGUID; (0×7d5a0f3)
+ (unsigned int) defaultCStringEncoding; (0×11649ca)
+ (BOOL) supportsSecureCoding; (0×1258f74)
+ (id) localizedStringWithFormat:(id)arg1; (0×125684d)
+ (id) localizedNameOfStringEncoding:(unsigned int)arg1; (0×1166bbe)
+ (id) stringWithCharacters:(const unsigned short*)arg1 length:(unsigned int)arg2; (0×1188bbe)
+ (id) pathWithComponents:(id)arg1; (0×1165181)
+ (id) stringWithString:(id)arg1; (0×11a2e83)
+ (id) stringWithCString:(const char*)arg1; (0×1256740)
+ (id) stringWithCString:(const char*)arg1 length:(unsigned int)arg2; (0×12567ea)
+ (id) stringWithCString:(const char*)arg1 encoding:(unsigned int)arg2; (0×11a231c)
+ (id) stringWithBytes:(const void*)arg1 length:(unsigned int)arg2 encoding:(unsigned int)arg3; (0×11ef8a5)
+ (id) stringWithFormat:(id)arg1 locale:(id)arg2; (0×12568d5)
+ (id) stringWithContentsOfFile:(id)arg1; (0×125696b)
+ (id) stringWithContentsOfURL:(id)arg1; (0×12569c6)
+ (id) stringWithContentsOfURL:(id)arg1 encoding:(unsigned int)arg2 error:(id*)arg3; (0×116a661)
+ (id) stringWithContentsOfURL:(id)arg1 usedEncoding:(unsigned int*)arg2 error:(id*)arg3; (0×1256a2a)
+ (id) stringWithContentsOfFile:(id)arg1 usedEncoding:(unsigned int*)arg2 error:(id*)arg3; (0×1256a9c)
+ (const unsigned int*) availableStringEncodings; (0×1259e58)
+ (id) _web_stringRepresentationForBytes:(long long)arg1; (0×1273329)
+ (void) initialize; (0×117b78e)
+ (id) allocWithZone:(_NSZone*)arg1; (0×1180464)
+ (id) string; (0×11cb32f)
+ (id) stringWithUTF8String:(const char*)arg1; (0×118aad8)
+ (id) stringWithFormat:(id)arg1; (0×118eb75)
+ (id) stringWithContentsOfFile:(id)arg1 encoding:(unsigned int)arg2 error:(id*)arg3; (0×1205443)
Properties:
@property (readonly, nonatomic) NSString* mobileMeDomain;
@property (readonly, nonatomic) BOOL hasMobileMeSuffix;
@property (readonly, nonatomic) NSString* stripMobileMSuffixIfPresent;
Instance Methods:
— (id) _uikit_stringByTrimmingWhitespaceAndNewlines; (0×5c648c)
— (id) _uikit_stringWithWritingDirection:(int)arg1 asOverride:(BOOL)arg2; (0×5c6571)
— (id) queryKeysAndValues; (0×43e327)
— (id) unescapedQueryValue; (0×43e301)
— (CGSize) _optimizedSizeWithFont:(id)arg1; (0×4340e2)
— (id) _adjustedFontFromFont:(id)arg1 withinFrame:(CGRect)arg2 minimumSize:(float)arg3 textSize:(CGSize*)arg4; (0×4341cb)
— (id) stringByStandardizingWhitespace; (0×4071ce)
…
_shortMethodDescription (если грубо, то вызывает [self __methodDescriptionForClass:[self class]])
(lldb) po [UIApplication _shortMethodDescription]
:
in UIApplication:
Class Methods:
+ (BOOL) registerAsSystemApp; (0×2378c5)
+ (BOOL) rendersLocally; (0×2378d7)
+ (void) _startWindowServerIfNecessary; (0×230e26)
+ (void) _startStatusBarServerIfNecessary; (0×230f9a)
+ (int) statusBarStyleForString:(id)arg1; (0×23c19d)
+ (int) _backgroundStyleForString:(id)arg1; (0×23c39e)
+ (BOOL) _isBackgroundStyleTransparent:(int)arg1; (0×23c4e0)
+ (int) interfaceOrientationForString:(id)arg1; (0×23c4ef)
+ (BOOL) isRunningInStoreDemoMode; (0×22abcb)
+ (BOOL) shouldMakeUIForDefaultPNG; (0×22ac29)
+ (void) _noteInterfaceOrientationChangingTo:(int)arg1; (0×22be17)
+ (void) _installAfterCACommitHandler; (0×22d45f)
+ (BOOL) _isAfterCACommitHandlerInstalled; (0×22d512)
+ (BOOL) isRunningEventPump; (0×237848)
+ (id) stringForStatusBarStyle:(int)arg1; (0×23c169)
+ (id) stringForInterfaceOrientation:(int)arg1; (0×23c5d9)
+ (void) registerObjectForStateRestoration:(id)arg1 restorationIdentifier:(id)arg2; (0×8e6863)
+ (id) sharedApplication; (0×22a2b0)
Properties:
@property (nonatomic, getter=isProximitySensingEnabled) BOOL proximitySensingEnabled;
@property (nonatomic) * delegate;
@property (nonatomic, getter=isIdleTimerDisabled) BOOL idleTimerDisabled;
@property (readonly, nonatomic) UIWindow* keyWindow;
@property (readonly, nonatomic) NSArray* windows;
@property (nonatomic, getter=isNetworkActivityIndicatorVisible) BOOL networkActivityIndicatorVisible;
@property (nonatomic) int statusBarStyle;
@property (nonatomic, getter=isStatusBarHidden) BOOL statusBarHidden;
@property (nonatomic) int statusBarOrientation;
@property (readonly, nonatomic) double statusBarOrientationAnimationDuration;
@property (readonly, nonatomic) CGRect statusBarFrame;
@property (nonatomic) int applicationIconBadgeNumber;
@property (nonatomic) BOOL applicationSupportsShakeToEdit;
@property (readonly, nonatomic) int applicationState;
@property (readonly, nonatomic) double backgroundTimeRemaining;
@property (readonly, nonatomic) int backgroundRefreshStatus;
@property (readonly, nonatomic, getter=isProtectedDataAvailable) BOOL protectedDataAvailable;
@property (readonly, nonatomic) int userInterfaceLayoutDirection;
@property (readonly, nonatomic) NSString* preferredContentSizeCategory;
@property (copy, nonatomic, setter=_setPreferredContentSizeCategoryName:) NSString* preferredContentSizeCategoryName; (@synthesize preferredContentSizeCategoryName = _preferredContentSizeCategoryName;)
@property (nonatomic, getter=_lastTimestampWhenFirstTouchCameDown, setter=_setLastTimestampWhenFirstTouchCameDown:) double lastTimestampWhenFirstTouchCameDown; (@synthesize lastTimestampWhenFirstTouchCameDown = _lastTimestampWhenFirstTouchCameDown;)
@property (nonatomic, getter=_lastTimestampWhenAllTouchesLifted, setter=_setLastTimestampWhenAllTouchesLifted:) double lastTimestampWhenAllTouchesLifted; (@synthesize lastTimestampWhenAllTouchesLifted = _lastTimestampWhenAllTouchesLifted;)
@property (nonatomic, getter=_lastLocationWhereFirstTouchCameDown, setter=_setLastLocationWhereFirstTouchCameDown:) CGPoint lastLocationWhereFirstTouchCameDown; (@synthesize lastLocationWhereFirstTouchCameDown = _lastLocationWhereFirstTouchCameDown;)
@property (nonatomic, getter=_lastLocationWhereAllTouchesLifted, setter=_setLastLocationWhereAllTouchesLifted:) CGPoint lastLocationWhereAllTouchesLifted; (@synthesize lastLocationWhereAllTouchesLifted = _lastLocationWhereAllTouchesLifted;)
Instance Methods:
— (int) statusBarOrientation; (0×236147)
— (int) alertInterfaceOrientation; (0×247f45)
— (void) startedTest:(id)arg1; (0×38e6ce)
— (void) finishedTest:(id)arg1; (0×390a59)
— (id) _touchesEvent; (0×23d94f)
— (void) setApplicationSupportsShakeToEdit:(BOOL)arg1; (0×23bf31)
— (void) _deactivateForReason:(int)arg1 notify:(BOOL)arg2; (0×22b8f8)
— (void) _fetchInfoPlistFlags; (0×23c7f0)
— (void) _setTextLegibilityEnabled:(BOOL)arg1; (0×249882)
— (id) _mainStoryboardName; (0×22bf4d)
— (BOOL) _doRestorationIfNecessary; (0×249d5d)
…
(UIResponder …)
_ivarDescription — все айвары объекта, разбитые по классам от которых они унаследованы
(lldb) po [[UIApplication sharedApplication] _ivarDescription]
:
in UIApplication:
_delegate (*):
_exclusiveTouchWindows (NSMutableSet*): <__NSSetM: 0x8d838e0>
_event (UIEvent*):
_touchesEvent (UIEvent*):
_motionEvent (UIEvent*):
_remoteControlEvent (UIEvent*):
_remoteControlEventObservers (int): 0
_topLevelNibObjects (NSArray*): nil
_networkResourcesCurrentlyLoadingCount (int): 0
_hideNetworkActivityIndicatorTimer (NSTimer*): nil
_editAlertView (UIAlertView*): nil
_statusBar (UIStatusBar*):
_statusBarRequestedStyle (int): 0
_statusBarWindow (UIStatusBarWindow*):
_observerBlocks (NSMutableArray*): <__NSArrayM: 0x8d85060>
_postCommitActions (NSMutableArray*): <__NSArrayM: 0x8d85080>
_mainStoryboardName (NSString*): @«Main_iPhone»
_tintViewDurationStack (NSMutableArray*): nil
_statusBarTintColorLockingControllers (NSMutableArray*): nil
_statusBarTintColorLockingCount (int): 0
_preferredContentSizeCategory (NSString*): nil
_applicationFlags (unknown type)
_defaultTopNavBarTintColor (UIColor*): nil
_undoButtonIndex (int): 0
_redoButtonIndex (int): 0
_moveEvent (UIMoveEvent*):
_physicalButtonsEvent (UIPhysicalButtonsEvent*):
_wheelEvent (UIWheelEvent*):
_physicalButtonMap (NSMutableDictionary*): <__NSDictionaryM: 0x8d832f0>
_physicalKeyboardEvent (UIPhysicalKeyboardEvent*):
_backgroundHitTestWindow (UIWindow*): nil
_eventQueue (NSMutableArray*): <__NSArrayM: 0x8d850a0>
_childEventMap (__CFDictionary*):
_disableTouchCoalescingCount (int): 0
_currentTimestampWhenFirstTouchCameDown (double): 127388.411122337
_currentLocationWhereFirstTouchCameDown (CGPoint): {274, 549.5}
_preferredContentSizeCategoryName (NSString*): nil
_lastTimestampWhenFirstTouchCameDown (double): 127386.946548556
_lastTimestampWhenAllTouchesLifted (double): 127388.416909239
_lastLocationWhereFirstTouchCameDown (CGPoint): {93.5, 116.5}
_lastLocationWhereAllTouchesLifted (CGPoint): {274, 549.5}
in UIResponder:
in NSObject:
isa (Class): UIApplication
__ivarDescriptionForClass — список айваров в конкретном классе, без учета базовых классов
(lldb) po [[UIApplication sharedApplication] __ivarDescriptionForClass:[NSObject class]]
in NSObject:
isa (Class): UIApplication
© Habrahabr.ru