Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Add tip with @objc #495

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 2015-03-30-quick-look-debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down