Created
November 5, 2018 16:30
-
-
Save DaidoujiChen/7ba689f4f57c52e9fffc90572739a0ca to your computer and use it in GitHub Desktop.
=.= Why shouldAutorotate not work in swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
@interface UIViewController (OwO) | |
- (BOOL)shouldAutorotate; | |
@end | |
@implementation UIViewController (OwO) | |
- (BOOL)shouldAutorotate { | |
NSLog(@"Work"); | |
return false; | |
} | |
@end | |
@interface ViewController : UIViewController | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "ViewController.h" | |
@implementation ViewController | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UIViewController { | |
var shouldAutorotate: Bool { | |
print("Not Work") | |
return false | |
} | |
} | |
class ViewController: UIViewController { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment