A developer who has long been developing in Java.
I started touching Swift recently, but let me ask you one question.
I heard that Swift is mainly implemented using "Delegate" when describing events.
In any sample, the implementation method was like defining the delegate method in the source by arranging the delegate protocol after the ":" in the class declaration.
Is it possible to define the implementation in the source like an anonymous class of Java interface without writing the protocol name at the time of class declaration?
Answer # 1
Is it a closure?
[Swift] You can see by illustration! Specific usage of Closure.
- ios - about swift learning method
- ios - swift when you do not want to execute the superclass method in the subclass
- swift - delegate method does not run
- ios - uiimageview animation in swift
- ios - [swift 5] i want to dynamically change the title of navigationbar
- how to use swift userdefaults class and method
- [swift] how to implement context menu in tableview of macos
- ios - swift: i want to add a shadow to the frame of textview
- ios - [swiftui, swift] the array of the type originally defined in userdefaults cannot be saved
- ios - picker close button in swift
- ios - swift: when i hit the button repeatedly, i want to display the text display time from the last time i press it
- ios - i want to execute a method that uses both ui widgets connected to different classes
- ios - [swift] error when cropping uiimage
- ios - swift return value cannot be returned as expected
- ios - i want to make more than 100 patterns with swift and conditional branching
- ios - [swift] when i made a view controller in xcode 11 without using a storyboard, it became the upper half view
- ios - [swift] even if uivisualeffectview is added to uiimageview, subsubview does not take effect
- swift - about "a" and "#" of aselector of scheduledtime () method
- ios - [swift 5] change the color of the textview selection
- ios - [swift 5] i want to reflect the color changed by textview on the label of a different screen
- ios - i want to instantiate a uiimageview and resize it
- ios - how to code the position of ui parts with the ratio from the center
- ios - [swift5] i want to automatically adjust the height of the uitableview header set in storyboard
- [ios/swift] i want to create a graph
- ios - a bug that the characters become momentarily large after swift animation
- ios - i want to convert my own error type when an unknown error comes
- ios - i want to get the date to display on the calendar
- [swift/ios] want to set the number of tabs dynamically with uitabbar
- ios - what should i do when using parchment to display something on the screen?