mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
baf0ea96d6
Improves the detection logic for iPhone 6 and above (uses interface idiom and the pixel width of the screen). This fixes detection on the iPhone 7 which was previously broken because it’s model number wasn’t include. Also removes a number of category methods that weren’t being used in the codebase and were equally incomplete. // FREEBIE
25 lines
472 B
Objective-C
25 lines
472 B
Objective-C
//
|
|
// UIDevice+TSHardwareVersion.h
|
|
// Signal
|
|
//
|
|
// Created by Dylan Bourgeois on 19/12/14.
|
|
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
|
|
//
|
|
// Original Source :
|
|
// Erica Sadun, http://ericasadun.com
|
|
// iPhone Developer's Cookbook, 6.x Edition
|
|
// BSD License, Use at your own risk
|
|
//
|
|
//
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
|
|
@interface UIDevice (TSHardwareVersion)
|
|
|
|
/*
|
|
* Returns true if device is iPhone 6 or 6+
|
|
*/
|
|
- (BOOL)isiPhoneVersionSixOrMore;
|
|
|
|
@end
|