forked from tomcool420/SMFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSMFCompatibility.m
More file actions
54 lines (51 loc) · 1.2 KB
/
SMFCompatibility.m
File metadata and controls
54 lines (51 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//
// SMFCompatibility.m
// SMFramework
//
// Created by Thomas Cool on 7/13/11.
// Copyright 2011 tomcool.org. All rights reserved.
//
#import "SMFCompatibility.h"
#import "SMFramework.h"
@implementation SMFCompatibility
SYNTHESIZE_SINGLETON_FOR_CLASS(SMFCompatibility, compat)
-(id)init
{
self=[super init];
if (self!=nil) {
_usingFourPointFourPlus=NO;
_usingFourPointThreePlus=NO;
_usingFourPointTwoPlus=NO;
if (NSClassFromString(@"BRVoiceOver")!=nil) {
_usingFourPointTwoPlus=YES;
}
if (_usingFourPointTwoPlus && NSClassFromString(@"BRTableView")) {
_usingFourPointThreePlus=YES;
}
if (_usingFourPointThreePlus && NSClassFromString(@"ATVAudioOption"))
{
_usingFourPointFourGM=YES;
}
if (_usingFourPointThreePlus && NSClassFromString(@"BRProxyManager")) {
_usingFourPointFourPlus=YES;
}
}
return self;
}
-(BOOL)usingFourPointTwoPlus
{
return _usingFourPointTwoPlus;
}
-(BOOL)usingFourPointThreePlus
{
return _usingFourPointThreePlus;
}
-(BOOL)usingFourPointFourPlus
{
return _usingFourPointFourPlus;
}
-(BOOL)usingFourPointFourGM
{
return _usingFourPointFourGM;
}
@end