1//
 2//  BlockUI.h
 3//
 4//  Created by Gustavo Ambrozio on 14/2/12.
 5//
 6
 7#ifndef BlockUI_h
 8#define BlockUI_h
 9
10#if __IPHONE_OS_VERSION_MAX_ALLOWED < 60000
11#define NSTextAlignmentCenter       UITextAlignmentCenter
12#define NSLineBreakByWordWrapping   UILineBreakModeWordWrap
13#define NSLineBreakByClipping       UILineBreakModeClip
14
15#endif
16
17#ifndef IOS_LESS_THAN_6
18#define IOS_LESS_THAN_6 !([[[UIDevice currentDevice] systemVersion] compare:@"6.0" options:NSNumericSearch] != NSOrderedAscending)
19
20#endif
21
22#define NeedsLandscapePhoneTweaks (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation]) && UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPad)
23
24
25// Action Sheet constants
26
27#define kActionSheetBounce         10
28#define kActionSheetBorder         10
29#define kActionSheetButtonHeight   45
30#define kActionSheetTopMargin      15
31
32#define kActionSheetTitleFont           [UIFont systemFontOfSize:18]
33#define kActionSheetTitleTextColor      [UIColor whiteColor]
34#define kActionSheetTitleShadowColor    [UIColor blackColor]
35#define kActionSheetTitleShadowOffset   CGSizeMake(0, -1)
36
37#define kActionSheetButtonFont          [UIFont boldSystemFontOfSize:20]
38#define kActionSheetButtonTextColor     [UIColor whiteColor]
39#define kActionSheetButtonShadowColor   [UIColor blackColor]
40#define kActionSheetButtonShadowOffset  CGSizeMake(0, -1)
41
42#define kActionSheetBackground              @"action-sheet-panel.png"
43#define kActionSheetBackgroundCapHeight     30
44
45
46// Alert View constants
47
48#define kAlertViewBounce         20
49#define kAlertViewBorder         (NeedsLandscapePhoneTweaks ? 5 : 10)
50#define kAlertButtonHeight       (NeedsLandscapePhoneTweaks ? 35 : 44)
51
52
53#define kAlertViewTitleFont             [UIFont boldSystemFontOfSize:20]
54#define kAlertViewTitleTextColor        [UIColor colorWithWhite:244.0/255.0 alpha:1.0]
55#define kAlertViewTitleShadowColor      [UIColor blackColor]
56#define kAlertViewTitleShadowOffset     CGSizeMake(0, -1)
57
58#define kAlertViewMessageFont           [UIFont systemFontOfSize:18]
59#define kAlertViewMessageTextColor      [UIColor colorWithWhite:244.0/255.0 alpha:1.0]
60#define kAlertViewMessageShadowColor    [UIColor blackColor]
61#define kAlertViewMessageShadowOffset   CGSizeMake(0, -1)
62
63#define kAlertViewButtonFont            [UIFont boldSystemFontOfSize:18]
64#define kAlertViewButtonTextColor       [UIColor whiteColor]
65#define kAlertViewButtonShadowColor     [UIColor blackColor]
66#define kAlertViewButtonShadowOffset    CGSizeMake(0, -1)
67
68#define kAlertViewBackground            @"alert-window.png"
69#define kAlertViewBackgroundLandscape   @"alert-window-landscape.png"
70#define kAlertViewBackgroundCapHeight   38
71
72#endif