Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class childA : Parent{
- //written in swift
- }
- public class childB : Parent{
- //written in swift
- }
- @interface Parent @end
- @implementation Parent
- //written objective c
- - (instancetype)initWithFrame:(CGRect)frame
- {
- self = [super initWithFrame:frame];
- if (self) {
- [self initialize];
- }
- return self;
- }
- - (instancetype)initWithCoder:(NSCoder *)coder
- {
- self = [super initWithCoder:coder];
- if (self) {
- [self initialize];
- }
- return self;
- }
- @end
- let cA = childA.Type
- cA.init() // here default initWithCoder the Parent class
- let cB = childB.Type
- cB.init() // here for some reason it calls initWithFrame
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement