mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-16 03:09:56 +00:00
Merge branch 'refs/heads/feature/instancetype' into develop
This commit is contained in:
commit
7963fdf5a7
@ -53,7 +53,7 @@
|
||||
|
||||
#pragma mark - NSObject
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame {
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if ((self = [super initWithFrame:frame])) {
|
||||
self.autoresizingMask = UIViewAutoresizingFlexibleWidth;
|
||||
self.backgroundColor = kWhiteBackgroundColorDefault;
|
||||
|
||||
@ -139,7 +139,7 @@
|
||||
[encoder encodeObject:self.uuids forKey:@"uuids"];
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)decoder {
|
||||
- (instancetype)initWithCoder:(NSCoder *)decoder {
|
||||
if ((self = [super init])) {
|
||||
self.name = [decoder decodeObjectForKey:@"name"];
|
||||
self.version = [decoder decodeObjectForKey:@"version"];
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
|
||||
@implementation BITArrowImageAnnotation
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame {
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
self.shapeLayer = [CAShapeLayer layer];
|
||||
|
||||
@ -240,7 +240,7 @@ static inline NSAttributedString * NSAttributedStringBySettingColorFromContext(N
|
||||
@synthesize verticalAlignment = _verticalAlignment;
|
||||
@synthesize activeLink = _activeLink;
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame {
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (!self) {
|
||||
return nil;
|
||||
@ -251,7 +251,7 @@ static inline NSAttributedString * NSAttributedStringBySettingColorFromContext(N
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)coder {
|
||||
- (instancetype)initWithCoder:(NSCoder *)coder {
|
||||
self = [super initWithCoder:coder];
|
||||
if (!self) {
|
||||
return nil;
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
|
||||
@implementation BITBlurImageAnnotation
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame {
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
self.clipsToBounds = YES;
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
[encoder encodeObject:self.contentType forKey:@"contentType"];
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)decoder {
|
||||
- (instancetype)initWithCoder:(NSCoder *)decoder {
|
||||
if ((self = [super init])) {
|
||||
_filename = [decoder decodeObjectForKey:@"filename"];
|
||||
_crashAttachmentData = [decoder decodeObjectForKey:@"data"];
|
||||
|
||||
@ -124,7 +124,7 @@ static PLCrashReporterCallbacks plCrashCallbacks = {
|
||||
}
|
||||
|
||||
|
||||
- (id)init {
|
||||
- (instancetype)init {
|
||||
if ((self = [super init])) {
|
||||
_delegate = nil;
|
||||
_showAlwaysButton = YES;
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
|
||||
#pragma mark - NSObject
|
||||
|
||||
- (id)init {
|
||||
- (instancetype)init {
|
||||
if ((self = [super init])) {
|
||||
_customActivityImage = nil;
|
||||
_customActivityTitle = nil;
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
|
||||
#pragma mark - NSObject
|
||||
|
||||
- (id)init {
|
||||
- (instancetype)init {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.title = BITHockeyLocalizedString(@"HockeyFeedbackComposeTitle");
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
@implementation BITFeedbackListViewCell
|
||||
|
||||
|
||||
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
|
||||
if (self) {
|
||||
// Initialization code
|
||||
|
||||
@ -77,7 +77,7 @@
|
||||
|
||||
#pragma mark - Initialization
|
||||
|
||||
- (id)init {
|
||||
- (instancetype)init {
|
||||
if ((self = [super init])) {
|
||||
_currentFeedbackListViewController = nil;
|
||||
_currentFeedbackComposeViewController = nil;
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
@implementation BITFeedbackUserDataViewController
|
||||
|
||||
|
||||
- (id)initWithStyle:(UITableViewStyle)style {
|
||||
- (instancetype)initWithStyle:(UITableViewStyle)style {
|
||||
self = [super initWithStyle:style];
|
||||
if (self) {
|
||||
self.title = BITHockeyLocalizedString(@"HockeyFeedbackUserDataTitle");
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
}
|
||||
|
||||
|
||||
- (id)init {
|
||||
- (instancetype)init {
|
||||
if ((self = [super init])) {
|
||||
_serverURL = BITHOCKEYSDK_URL;
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithAppIdentifier:(NSString *)appIdentifier isAppStoreEnvironment:(BOOL)isAppStoreEnvironment {
|
||||
- (instancetype)initWithAppIdentifier:(NSString *)appIdentifier isAppStoreEnvironment:(BOOL)isAppStoreEnvironment {
|
||||
if ((self = [self init])) {
|
||||
_appIdentifier = appIdentifier;
|
||||
_isAppStoreEnvironment = isAppStoreEnvironment;
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
@property (nonatomic, strong) NSString *appIdentifier;
|
||||
|
||||
- (id)initWithAppIdentifier:(NSString *)appIdentifier isAppStoreEnvironment:(BOOL)isAppStoreEnvironment;
|
||||
- (instancetype)initWithAppIdentifier:(NSString *)appIdentifier isAppStoreEnvironment:(BOOL)isAppStoreEnvironment;
|
||||
|
||||
- (void)startManager;
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
@implementation BITRectangleImageAnnotation
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame {
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
self.shapeLayer = [CAShapeLayer layer];
|
||||
|
||||
@ -71,8 +71,8 @@ typedef NS_ENUM(NSUInteger, BITStoreButtonStyle) {
|
||||
// The interface is flexible, so there is now fixed order
|
||||
@interface BITStoreButton : UIButton
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame;
|
||||
- (id)initWithPadding:(CGPoint)padding style:(BITStoreButtonStyle)style;
|
||||
- (instancetype)initWithFrame:(CGRect)frame;
|
||||
- (instancetype)initWithPadding:(CGPoint)padding style:(BITStoreButtonStyle)style;
|
||||
|
||||
// action delegate
|
||||
@property (nonatomic, weak) id<BITStoreButtonDelegate> buttonDelegate;
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
|
||||
#pragma mark - NSObject
|
||||
|
||||
- (id)initWithLabel:(NSString*)aLabel enabled:(BOOL)flag {
|
||||
- (instancetype)initWithLabel:(NSString*)aLabel enabled:(BOOL)flag {
|
||||
if ((self = [super init])) {
|
||||
self.label = aLabel;
|
||||
self.enabled = flag;
|
||||
@ -152,7 +152,7 @@
|
||||
|
||||
#pragma mark - NSObject
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame {
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if ((self = [super initWithFrame:frame])) {
|
||||
self.layer.needsDisplayOnBoundsChange = YES;
|
||||
|
||||
@ -167,7 +167,7 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithPadding:(CGPoint)padding style:(BITStoreButtonStyle)style {
|
||||
- (instancetype)initWithPadding:(CGPoint)padding style:(BITStoreButtonStyle)style {
|
||||
CGRect frame = CGRectMake(0, 0, 40, BIT_MIN_HEIGHT);
|
||||
if ((self = [self initWithFrame:frame])) {
|
||||
_customPadding = padding;
|
||||
|
||||
@ -106,7 +106,7 @@
|
||||
|
||||
#pragma mark - Init
|
||||
|
||||
- (id)init {
|
||||
- (instancetype)init {
|
||||
if ((self = [super init])) {
|
||||
_checkInProgress = NO;
|
||||
_updateAvailable = NO;
|
||||
|
||||
@ -386,7 +386,7 @@ typedef NS_ENUM(NSInteger, BITUpdateAlertViewTag) {
|
||||
|
||||
#pragma mark - Init
|
||||
|
||||
- (id)init {
|
||||
- (instancetype)init {
|
||||
if ((self = [super init])) {
|
||||
_delegate = nil;
|
||||
_expiryDate = nil;
|
||||
|
||||
@ -230,7 +230,7 @@
|
||||
|
||||
#pragma mark - Init
|
||||
|
||||
- (id)initWithStyle:(UITableViewStyle)style {
|
||||
- (instancetype)initWithStyle:(UITableViewStyle)style {
|
||||
if ((self = [super initWithStyle:UITableViewStylePlain])) {
|
||||
_updateManager = [BITHockeyManager sharedHockeyManager].updateManager ;
|
||||
_isAppStoreEnvironment = [BITHockeyManager sharedHockeyManager].isAppStoreEnvironment;
|
||||
|
||||
@ -118,7 +118,7 @@ body { font: 13px 'Helvetica Neue', Helvetica; color:#626262; word-wrap:break-wo
|
||||
|
||||
#pragma mark - NSObject
|
||||
|
||||
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
if((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) {
|
||||
self.cellBackgroundColor = [UIColor clearColor];
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
@end
|
||||
@implementation MyDeviceWithIdentifierForVendor
|
||||
|
||||
- (id)init {
|
||||
- (instancetype)init {
|
||||
self = [super init];
|
||||
if( self ) {
|
||||
_identifierForVendor = [NSUUID UUID];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user