From 1d2319a44aeb10062e6fdf953242ae936420b517 Mon Sep 17 00:00:00 2001 From: Bruno Macabeus Date: Sat, 20 May 2017 09:11:42 -0300 Subject: [PATCH] Add tip with @objc --- 2015-03-30-quick-look-debugging.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2015-03-30-quick-look-debugging.md b/2015-03-30-quick-look-debugging.md index f8b68568..d8cc168b 100644 --- a/2015-03-30-quick-look-debugging.md +++ b/2015-03-30-quick-look-debugging.md @@ -92,10 +92,10 @@ What's more, these Quick Look popups often include a button that will open the c ### Custom Types -For anything beyond these built-in types, Xcode 6 has added Quick Look for custom objects. The implementation couldn't be simpler—add a single `debugQuickLookObject()` method to any `NSObject`-derived class, and you're set. `debugQuickLookObject()` can then return any of the built-in types described above, configured for your custom type's needs: +For anything beyond these built-in types, Xcode 6 has added Quick Look for custom objects. The implementation couldn't be simpler—add a single `debugQuickLookObject()` method to any `NSObject`. If your class isn't inhrerit `NSObject`, you can add anotation `@objc` for function `debugQuickLookObject`. `debugQuickLookObject()` can then return any of the built-in types described above, configured for your custom type's needs: ```swift -func debugQuickLookObject() -> AnyObject { +@objc func debugQuickLookObject() -> AnyObject { let path = buildPathWithRadius(radius, steps: steps, loopCount: loopCount) return path }