├── .gitignore ├── DXAlertView.xcodeproj └── project.pbxproj ├── DXAlertView ├── AppDelegate.h ├── AppDelegate.m ├── DXAlertView-Info.plist ├── DXAlertView-Prefix.pch ├── Default-568h@2x.png ├── Default.png ├── Default@2x.png ├── MainViewController.h ├── MainViewController.m ├── en.lproj │ └── InfoPlist.strings └── main.m ├── LICENSE ├── README.md └── Vendor ├── DXAlertView.h ├── DXAlertView.m ├── btn_close_normal.png ├── btn_close_normal@2x.png ├── btn_close_selected.png └── btn_close_selected@2x.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | *.xcworkspace 13 | !default.xcworkspace 14 | xcuserdata 15 | profile 16 | *.moved-aside 17 | DerivedData 18 | .idea/ 19 | -------------------------------------------------------------------------------- /DXAlertView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6251EE1E17E1C33A0066B37D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6251EE1D17E1C33A0066B37D /* UIKit.framework */; }; 11 | 6251EE2017E1C33A0066B37D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6251EE1F17E1C33A0066B37D /* Foundation.framework */; }; 12 | 6251EE2217E1C33A0066B37D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6251EE2117E1C33A0066B37D /* CoreGraphics.framework */; }; 13 | 6251EE2817E1C33A0066B37D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6251EE2617E1C33A0066B37D /* InfoPlist.strings */; }; 14 | 6251EE2A17E1C33A0066B37D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6251EE2917E1C33A0066B37D /* main.m */; }; 15 | 6251EE2E17E1C33A0066B37D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6251EE2D17E1C33A0066B37D /* AppDelegate.m */; }; 16 | 6251EE3017E1C33A0066B37D /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6251EE2F17E1C33A0066B37D /* Default.png */; }; 17 | 6251EE3217E1C33A0066B37D /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6251EE3117E1C33A0066B37D /* Default@2x.png */; }; 18 | 6251EE3417E1C33A0066B37D /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6251EE3317E1C33A0066B37D /* Default-568h@2x.png */; }; 19 | 6251EE3C17E1C3510066B37D /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6251EE3B17E1C3510066B37D /* MainViewController.m */; }; 20 | 6251EE4817E1C4460066B37D /* btn_close_normal.png in Resources */ = {isa = PBXBuildFile; fileRef = 6251EE4417E1C4460066B37D /* btn_close_normal.png */; }; 21 | 6251EE4917E1C4460066B37D /* btn_close_normal@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6251EE4517E1C4460066B37D /* btn_close_normal@2x.png */; }; 22 | 6251EE4A17E1C4460066B37D /* btn_close_selected.png in Resources */ = {isa = PBXBuildFile; fileRef = 6251EE4617E1C4460066B37D /* btn_close_selected.png */; }; 23 | 6251EE4B17E1C4460066B37D /* btn_close_selected@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6251EE4717E1C4460066B37D /* btn_close_selected@2x.png */; }; 24 | 62B34B9B1827AE1000AD4061 /* DXAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 62B34B9A1827AE1000AD4061 /* DXAlertView.m */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXFileReference section */ 28 | 6251EE1A17E1C33A0066B37D /* DXAlertView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DXAlertView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 29 | 6251EE1D17E1C33A0066B37D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 30 | 6251EE1F17E1C33A0066B37D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 31 | 6251EE2117E1C33A0066B37D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 32 | 6251EE2517E1C33A0066B37D /* DXAlertView-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "DXAlertView-Info.plist"; sourceTree = ""; }; 33 | 6251EE2717E1C33A0066B37D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 34 | 6251EE2917E1C33A0066B37D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 35 | 6251EE2B17E1C33A0066B37D /* DXAlertView-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "DXAlertView-Prefix.pch"; sourceTree = ""; }; 36 | 6251EE2C17E1C33A0066B37D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 37 | 6251EE2D17E1C33A0066B37D /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 38 | 6251EE2F17E1C33A0066B37D /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 39 | 6251EE3117E1C33A0066B37D /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; 40 | 6251EE3317E1C33A0066B37D /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 41 | 6251EE3A17E1C3510066B37D /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = ""; }; 42 | 6251EE3B17E1C3510066B37D /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = ""; }; 43 | 6251EE4417E1C4460066B37D /* btn_close_normal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = btn_close_normal.png; sourceTree = ""; }; 44 | 6251EE4517E1C4460066B37D /* btn_close_normal@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "btn_close_normal@2x.png"; sourceTree = ""; }; 45 | 6251EE4617E1C4460066B37D /* btn_close_selected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = btn_close_selected.png; sourceTree = ""; }; 46 | 6251EE4717E1C4460066B37D /* btn_close_selected@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "btn_close_selected@2x.png"; sourceTree = ""; }; 47 | 62B34B991827AE1000AD4061 /* DXAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DXAlertView.h; sourceTree = ""; }; 48 | 62B34B9A1827AE1000AD4061 /* DXAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DXAlertView.m; sourceTree = ""; }; 49 | /* End PBXFileReference section */ 50 | 51 | /* Begin PBXFrameworksBuildPhase section */ 52 | 6251EE1717E1C33A0066B37D /* Frameworks */ = { 53 | isa = PBXFrameworksBuildPhase; 54 | buildActionMask = 2147483647; 55 | files = ( 56 | 6251EE1E17E1C33A0066B37D /* UIKit.framework in Frameworks */, 57 | 6251EE2017E1C33A0066B37D /* Foundation.framework in Frameworks */, 58 | 6251EE2217E1C33A0066B37D /* CoreGraphics.framework in Frameworks */, 59 | ); 60 | runOnlyForDeploymentPostprocessing = 0; 61 | }; 62 | /* End PBXFrameworksBuildPhase section */ 63 | 64 | /* Begin PBXGroup section */ 65 | 6251EE1117E1C33A0066B37D = { 66 | isa = PBXGroup; 67 | children = ( 68 | 6251EE3D17E1C36E0066B37D /* Vendor */, 69 | 6251EE2317E1C33A0066B37D /* DXAlertView */, 70 | 6251EE1C17E1C33A0066B37D /* Frameworks */, 71 | 6251EE1B17E1C33A0066B37D /* Products */, 72 | ); 73 | sourceTree = ""; 74 | }; 75 | 6251EE1B17E1C33A0066B37D /* Products */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 6251EE1A17E1C33A0066B37D /* DXAlertView.app */, 79 | ); 80 | name = Products; 81 | sourceTree = ""; 82 | }; 83 | 6251EE1C17E1C33A0066B37D /* Frameworks */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 6251EE1D17E1C33A0066B37D /* UIKit.framework */, 87 | 6251EE1F17E1C33A0066B37D /* Foundation.framework */, 88 | 6251EE2117E1C33A0066B37D /* CoreGraphics.framework */, 89 | ); 90 | name = Frameworks; 91 | sourceTree = ""; 92 | }; 93 | 6251EE2317E1C33A0066B37D /* DXAlertView */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 6251EE3A17E1C3510066B37D /* MainViewController.h */, 97 | 6251EE3B17E1C3510066B37D /* MainViewController.m */, 98 | 6251EE2C17E1C33A0066B37D /* AppDelegate.h */, 99 | 6251EE2D17E1C33A0066B37D /* AppDelegate.m */, 100 | 6251EE2417E1C33A0066B37D /* Supporting Files */, 101 | ); 102 | path = DXAlertView; 103 | sourceTree = ""; 104 | }; 105 | 6251EE2417E1C33A0066B37D /* Supporting Files */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 6251EE2517E1C33A0066B37D /* DXAlertView-Info.plist */, 109 | 6251EE2617E1C33A0066B37D /* InfoPlist.strings */, 110 | 6251EE2917E1C33A0066B37D /* main.m */, 111 | 6251EE2B17E1C33A0066B37D /* DXAlertView-Prefix.pch */, 112 | 6251EE2F17E1C33A0066B37D /* Default.png */, 113 | 6251EE3117E1C33A0066B37D /* Default@2x.png */, 114 | 6251EE3317E1C33A0066B37D /* Default-568h@2x.png */, 115 | ); 116 | name = "Supporting Files"; 117 | sourceTree = ""; 118 | }; 119 | 6251EE3D17E1C36E0066B37D /* Vendor */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 62B34B991827AE1000AD4061 /* DXAlertView.h */, 123 | 62B34B9A1827AE1000AD4061 /* DXAlertView.m */, 124 | 6251EE4417E1C4460066B37D /* btn_close_normal.png */, 125 | 6251EE4517E1C4460066B37D /* btn_close_normal@2x.png */, 126 | 6251EE4617E1C4460066B37D /* btn_close_selected.png */, 127 | 6251EE4717E1C4460066B37D /* btn_close_selected@2x.png */, 128 | ); 129 | path = Vendor; 130 | sourceTree = ""; 131 | }; 132 | /* End PBXGroup section */ 133 | 134 | /* Begin PBXNativeTarget section */ 135 | 6251EE1917E1C33A0066B37D /* DXAlertView */ = { 136 | isa = PBXNativeTarget; 137 | buildConfigurationList = 6251EE3717E1C33A0066B37D /* Build configuration list for PBXNativeTarget "DXAlertView" */; 138 | buildPhases = ( 139 | 6251EE1617E1C33A0066B37D /* Sources */, 140 | 6251EE1717E1C33A0066B37D /* Frameworks */, 141 | 6251EE1817E1C33A0066B37D /* Resources */, 142 | ); 143 | buildRules = ( 144 | ); 145 | dependencies = ( 146 | ); 147 | name = DXAlertView; 148 | productName = DXAlertView; 149 | productReference = 6251EE1A17E1C33A0066B37D /* DXAlertView.app */; 150 | productType = "com.apple.product-type.application"; 151 | }; 152 | /* End PBXNativeTarget section */ 153 | 154 | /* Begin PBXProject section */ 155 | 6251EE1217E1C33A0066B37D /* Project object */ = { 156 | isa = PBXProject; 157 | attributes = { 158 | LastUpgradeCheck = 0460; 159 | ORGANIZATIONNAME = xiekw; 160 | }; 161 | buildConfigurationList = 6251EE1517E1C33A0066B37D /* Build configuration list for PBXProject "DXAlertView" */; 162 | compatibilityVersion = "Xcode 3.2"; 163 | developmentRegion = English; 164 | hasScannedForEncodings = 0; 165 | knownRegions = ( 166 | en, 167 | ); 168 | mainGroup = 6251EE1117E1C33A0066B37D; 169 | productRefGroup = 6251EE1B17E1C33A0066B37D /* Products */; 170 | projectDirPath = ""; 171 | projectRoot = ""; 172 | targets = ( 173 | 6251EE1917E1C33A0066B37D /* DXAlertView */, 174 | ); 175 | }; 176 | /* End PBXProject section */ 177 | 178 | /* Begin PBXResourcesBuildPhase section */ 179 | 6251EE1817E1C33A0066B37D /* Resources */ = { 180 | isa = PBXResourcesBuildPhase; 181 | buildActionMask = 2147483647; 182 | files = ( 183 | 6251EE2817E1C33A0066B37D /* InfoPlist.strings in Resources */, 184 | 6251EE3017E1C33A0066B37D /* Default.png in Resources */, 185 | 6251EE3217E1C33A0066B37D /* Default@2x.png in Resources */, 186 | 6251EE3417E1C33A0066B37D /* Default-568h@2x.png in Resources */, 187 | 6251EE4817E1C4460066B37D /* btn_close_normal.png in Resources */, 188 | 6251EE4917E1C4460066B37D /* btn_close_normal@2x.png in Resources */, 189 | 6251EE4A17E1C4460066B37D /* btn_close_selected.png in Resources */, 190 | 6251EE4B17E1C4460066B37D /* btn_close_selected@2x.png in Resources */, 191 | ); 192 | runOnlyForDeploymentPostprocessing = 0; 193 | }; 194 | /* End PBXResourcesBuildPhase section */ 195 | 196 | /* Begin PBXSourcesBuildPhase section */ 197 | 6251EE1617E1C33A0066B37D /* Sources */ = { 198 | isa = PBXSourcesBuildPhase; 199 | buildActionMask = 2147483647; 200 | files = ( 201 | 6251EE2A17E1C33A0066B37D /* main.m in Sources */, 202 | 6251EE2E17E1C33A0066B37D /* AppDelegate.m in Sources */, 203 | 6251EE3C17E1C3510066B37D /* MainViewController.m in Sources */, 204 | 62B34B9B1827AE1000AD4061 /* DXAlertView.m in Sources */, 205 | ); 206 | runOnlyForDeploymentPostprocessing = 0; 207 | }; 208 | /* End PBXSourcesBuildPhase section */ 209 | 210 | /* Begin PBXVariantGroup section */ 211 | 6251EE2617E1C33A0066B37D /* InfoPlist.strings */ = { 212 | isa = PBXVariantGroup; 213 | children = ( 214 | 6251EE2717E1C33A0066B37D /* en */, 215 | ); 216 | name = InfoPlist.strings; 217 | sourceTree = ""; 218 | }; 219 | /* End PBXVariantGroup section */ 220 | 221 | /* Begin XCBuildConfiguration section */ 222 | 6251EE3517E1C33A0066B37D /* Debug */ = { 223 | isa = XCBuildConfiguration; 224 | buildSettings = { 225 | ALWAYS_SEARCH_USER_PATHS = NO; 226 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 227 | CLANG_CXX_LIBRARY = "libc++"; 228 | CLANG_ENABLE_OBJC_ARC = YES; 229 | CLANG_WARN_CONSTANT_CONVERSION = YES; 230 | CLANG_WARN_EMPTY_BODY = YES; 231 | CLANG_WARN_ENUM_CONVERSION = YES; 232 | CLANG_WARN_INT_CONVERSION = YES; 233 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 234 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 235 | COPY_PHASE_STRIP = NO; 236 | GCC_C_LANGUAGE_STANDARD = gnu99; 237 | GCC_DYNAMIC_NO_PIC = NO; 238 | GCC_OPTIMIZATION_LEVEL = 0; 239 | GCC_PREPROCESSOR_DEFINITIONS = ( 240 | "DEBUG=1", 241 | "$(inherited)", 242 | ); 243 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 244 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 245 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 246 | GCC_WARN_UNUSED_VARIABLE = YES; 247 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 248 | ONLY_ACTIVE_ARCH = YES; 249 | SDKROOT = iphoneos; 250 | TARGETED_DEVICE_FAMILY = "1,2"; 251 | }; 252 | name = Debug; 253 | }; 254 | 6251EE3617E1C33A0066B37D /* Release */ = { 255 | isa = XCBuildConfiguration; 256 | buildSettings = { 257 | ALWAYS_SEARCH_USER_PATHS = NO; 258 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 259 | CLANG_CXX_LIBRARY = "libc++"; 260 | CLANG_ENABLE_OBJC_ARC = YES; 261 | CLANG_WARN_CONSTANT_CONVERSION = YES; 262 | CLANG_WARN_EMPTY_BODY = YES; 263 | CLANG_WARN_ENUM_CONVERSION = YES; 264 | CLANG_WARN_INT_CONVERSION = YES; 265 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 266 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 267 | COPY_PHASE_STRIP = YES; 268 | GCC_C_LANGUAGE_STANDARD = gnu99; 269 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 270 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 271 | GCC_WARN_UNUSED_VARIABLE = YES; 272 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 273 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 274 | SDKROOT = iphoneos; 275 | TARGETED_DEVICE_FAMILY = "1,2"; 276 | VALIDATE_PRODUCT = YES; 277 | }; 278 | name = Release; 279 | }; 280 | 6251EE3817E1C33A0066B37D /* Debug */ = { 281 | isa = XCBuildConfiguration; 282 | buildSettings = { 283 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 284 | GCC_PREFIX_HEADER = "DXAlertView/DXAlertView-Prefix.pch"; 285 | INFOPLIST_FILE = "DXAlertView/DXAlertView-Info.plist"; 286 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 287 | PRODUCT_NAME = "$(TARGET_NAME)"; 288 | WRAPPER_EXTENSION = app; 289 | }; 290 | name = Debug; 291 | }; 292 | 6251EE3917E1C33A0066B37D /* Release */ = { 293 | isa = XCBuildConfiguration; 294 | buildSettings = { 295 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 296 | GCC_PREFIX_HEADER = "DXAlertView/DXAlertView-Prefix.pch"; 297 | INFOPLIST_FILE = "DXAlertView/DXAlertView-Info.plist"; 298 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 299 | PRODUCT_NAME = "$(TARGET_NAME)"; 300 | WRAPPER_EXTENSION = app; 301 | }; 302 | name = Release; 303 | }; 304 | /* End XCBuildConfiguration section */ 305 | 306 | /* Begin XCConfigurationList section */ 307 | 6251EE1517E1C33A0066B37D /* Build configuration list for PBXProject "DXAlertView" */ = { 308 | isa = XCConfigurationList; 309 | buildConfigurations = ( 310 | 6251EE3517E1C33A0066B37D /* Debug */, 311 | 6251EE3617E1C33A0066B37D /* Release */, 312 | ); 313 | defaultConfigurationIsVisible = 0; 314 | defaultConfigurationName = Release; 315 | }; 316 | 6251EE3717E1C33A0066B37D /* Build configuration list for PBXNativeTarget "DXAlertView" */ = { 317 | isa = XCConfigurationList; 318 | buildConfigurations = ( 319 | 6251EE3817E1C33A0066B37D /* Debug */, 320 | 6251EE3917E1C33A0066B37D /* Release */, 321 | ); 322 | defaultConfigurationIsVisible = 0; 323 | defaultConfigurationName = Release; 324 | }; 325 | /* End XCConfigurationList section */ 326 | }; 327 | rootObject = 6251EE1217E1C33A0066B37D /* Project object */; 328 | } 329 | -------------------------------------------------------------------------------- /DXAlertView/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // DXAlertView 4 | // 5 | // Created by xiekw on 13-9-12. 6 | // Copyright (c) 2013年 xiekw. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /DXAlertView/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // DXAlertView 4 | // 5 | // Created by xiekw on 13-9-12. 6 | // Copyright (c) 2013年 xiekw. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "MainViewController.h" 11 | 12 | @implementation AppDelegate 13 | 14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 15 | { 16 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 17 | // Override point for customization after application launch. 18 | MainViewController *mvc = [[MainViewController alloc] initWithNibName:Nil bundle:Nil]; 19 | self.window.rootViewController = mvc; 20 | 21 | self.window.backgroundColor = [UIColor whiteColor]; 22 | [self.window makeKeyAndVisible]; 23 | return YES; 24 | } 25 | 26 | - (void)applicationWillResignActive:(UIApplication *)application 27 | { 28 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 29 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 30 | } 31 | 32 | - (void)applicationDidEnterBackground:(UIApplication *)application 33 | { 34 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 35 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 36 | } 37 | 38 | - (void)applicationWillEnterForeground:(UIApplication *)application 39 | { 40 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 41 | } 42 | 43 | - (void)applicationDidBecomeActive:(UIApplication *)application 44 | { 45 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 46 | } 47 | 48 | - (void)applicationWillTerminate:(UIApplication *)application 49 | { 50 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /DXAlertView/DXAlertView-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | Modudu.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /DXAlertView/DXAlertView-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'DXAlertView' target in the 'DXAlertView' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_3_0 8 | #warning "This project uses features only available in iOS SDK 3.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /DXAlertView/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiekw2010/DXAlertView/9e5f9c531d2dfe1b12f3fd0c967cef86d4478736/DXAlertView/Default-568h@2x.png -------------------------------------------------------------------------------- /DXAlertView/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiekw2010/DXAlertView/9e5f9c531d2dfe1b12f3fd0c967cef86d4478736/DXAlertView/Default.png -------------------------------------------------------------------------------- /DXAlertView/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiekw2010/DXAlertView/9e5f9c531d2dfe1b12f3fd0c967cef86d4478736/DXAlertView/Default@2x.png -------------------------------------------------------------------------------- /DXAlertView/MainViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MainViewController.h 3 | // DXAlertView 4 | // 5 | // Created by xiekw on 13-9-12. 6 | // Copyright (c) 2013年 xiekw. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MainViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /DXAlertView/MainViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MainViewController.m 3 | // DXAlertView 4 | // 5 | // Created by xiekw on 13-9-12. 6 | // Copyright (c) 2013年 xiekw. All rights reserved. 7 | // 8 | 9 | #import "MainViewController.h" 10 | #import "DXAlertView.h" 11 | 12 | @interface MainViewController () 13 | 14 | @end 15 | 16 | @implementation MainViewController 17 | 18 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 19 | { 20 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 21 | if (self) { 22 | // Custom initialization 23 | } 24 | return self; 25 | } 26 | 27 | - (void)viewDidLoad 28 | { 29 | [super viewDidLoad]; 30 | 31 | self.view.backgroundColor = [UIColor whiteColor]; 32 | 33 | UIButton *btn1 = [UIButton buttonWithType:UIButtonTypeRoundedRect]; 34 | [btn1 setTitle:@"Two button" forState:UIControlStateNormal]; 35 | [btn1 addTarget:self action:@selector(twoBtnClicked:) forControlEvents:UIControlEventTouchUpInside]; 36 | btn1.frame = CGRectMake(50, 50, 100, 50); 37 | [self.view addSubview:btn1]; 38 | 39 | UIButton *btn2 = [UIButton buttonWithType:UIButtonTypeRoundedRect]; 40 | [btn2 setTitle:@"One button" forState:UIControlStateNormal]; 41 | [btn2 addTarget:self action:@selector(OneBtnClicked:) forControlEvents:UIControlEventTouchUpInside]; 42 | btn2.frame = CGRectMake(50, 200, 100, 50); 43 | [self.view addSubview:btn2]; 44 | } 45 | 46 | - (void)twoBtnClicked:(id)sender 47 | { 48 | DXAlertView *alert = [[DXAlertView alloc] initWithTitle:@"Congratulations" contentText:@"You have bought something" leftButtonTitle:@"Ok" rightButtonTitle:@"Fine"]; 49 | [alert show]; 50 | alert.leftBlock = ^() { 51 | NSLog(@"left button clicked"); 52 | }; 53 | alert.rightBlock = ^() { 54 | NSLog(@"right button clicked"); 55 | }; 56 | alert.dismissBlock = ^() { 57 | NSLog(@"Do something interesting after dismiss block"); 58 | }; 59 | } 60 | 61 | - (void)OneBtnClicked:(id)sender 62 | { 63 | DXAlertView *alert = [[DXAlertView alloc] initWithTitle:@"Congratulations" contentText:@"You have bought something" leftButtonTitle:nil rightButtonTitle:@"Fine"]; 64 | [alert show]; 65 | alert.rightBlock = ^() { 66 | NSLog(@"right button clicked"); 67 | }; 68 | alert.dismissBlock = ^() { 69 | NSLog(@"Do something interesting after dismiss block"); 70 | }; 71 | } 72 | 73 | - (void)didReceiveMemoryWarning 74 | { 75 | [super didReceiveMemoryWarning]; 76 | // Dispose of any resources that can be recreated. 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /DXAlertView/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /DXAlertView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // DXAlertView 4 | // 5 | // Created by xiekw on 13-9-12. 6 | // Copyright (c) 2013年 xiekw. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 xiekw2010 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | DXAlertView 2 | =========== 3 | 4 | ## Feature 5 | 6 | 1. API is simple just like the UIAlertView. 7 | 2. The callback function is simple to write. 8 | 3. The animation is cool or in another saying----different from the triditional way. 9 | 10 | ### How to use 11 | 12 | eg: 13 | 14 | DXAlertView *alert = [[DXAlertView alloc] initWithTitle:@"Congratulations" contentText:@"You have bought something" leftButtonTitle:@"Ok" rightButtonTitle:@"Fine"]; 15 | [alert show]; 16 | 17 | alert.leftBlock = ^() { 18 | NSLog(@"left button clicked"); 19 | }; 20 | alert.rightBlock = ^() { 21 | NSLog(@"right button clicked"); 22 | }; 23 | alert.dismissBlock = ^() { 24 | NSLog(@"Do something interesting after dismiss block"); 25 | }; 26 | 27 | 28 | PicDemo: 29 | 30 | ![screenshots](http://ww4.sinaimg.cn/bmiddle/84178573jw1e8jvlyocrmg204g04gjzo.gif) 31 | -------------------------------------------------------------------------------- /Vendor/DXAlertView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ILSMLAlertView.h 3 | // MoreLikers 4 | // 5 | // Created by xiekw on 13-9-9. 6 | // Copyright (c) 2013年 谢凯伟. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DXAlertView : UIView 12 | 13 | - (id)initWithTitle:(NSString *)title 14 | contentText:(NSString *)content 15 | leftButtonTitle:(NSString *)leftTitle 16 | rightButtonTitle:(NSString *)rigthTitle; 17 | 18 | - (void)show; 19 | 20 | @property (nonatomic, copy) dispatch_block_t leftBlock; 21 | @property (nonatomic, copy) dispatch_block_t rightBlock; 22 | @property (nonatomic, copy) dispatch_block_t dismissBlock; 23 | 24 | @end 25 | 26 | @interface UIImage (colorful) 27 | 28 | + (UIImage *)imageWithColor:(UIColor *)color; 29 | 30 | @end -------------------------------------------------------------------------------- /Vendor/DXAlertView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ILSMLAlertView.m 3 | // MoreLikers 4 | // 5 | // Created by xiekw on 13-9-9. 6 | // Copyright (c) 2013年 谢凯伟. All rights reserved. 7 | // 8 | 9 | #import "DXAlertView.h" 10 | #import 11 | 12 | 13 | #define kAlertWidth 245.0f 14 | #define kAlertHeight 160.0f 15 | 16 | @interface DXAlertView () 17 | { 18 | BOOL _leftLeave; 19 | } 20 | 21 | @property (nonatomic, strong) UILabel *alertTitleLabel; 22 | @property (nonatomic, strong) UILabel *alertContentLabel; 23 | @property (nonatomic, strong) UIButton *leftBtn; 24 | @property (nonatomic, strong) UIButton *rightBtn; 25 | @property (nonatomic, strong) UIView *backImageView; 26 | 27 | @end 28 | 29 | @implementation DXAlertView 30 | 31 | + (CGFloat)alertWidth 32 | { 33 | return kAlertWidth; 34 | } 35 | 36 | + (CGFloat)alertHeight 37 | { 38 | return kAlertHeight; 39 | } 40 | 41 | - (id)initWithFrame:(CGRect)frame 42 | { 43 | self = [super initWithFrame:frame]; 44 | if (self) { 45 | // Initialization code 46 | } 47 | return self; 48 | } 49 | 50 | #define kTitleYOffset 15.0f 51 | #define kTitleHeight 25.0f 52 | 53 | #define kContentOffset 30.0f 54 | #define kBetweenLabelOffset 20.0f 55 | 56 | - (id)initWithTitle:(NSString *)title 57 | contentText:(NSString *)content 58 | leftButtonTitle:(NSString *)leftTitle 59 | rightButtonTitle:(NSString *)rigthTitle 60 | { 61 | if (self = [super init]) { 62 | self.layer.cornerRadius = 5.0; 63 | self.backgroundColor = [UIColor whiteColor]; 64 | self.alertTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, kTitleYOffset, kAlertWidth, kTitleHeight)]; 65 | self.alertTitleLabel.font = [UIFont boldSystemFontOfSize:20.0f]; 66 | self.alertTitleLabel.textColor = [UIColor colorWithRed:56.0/255.0 green:64.0/255.0 blue:71.0/255.0 alpha:1]; 67 | [self addSubview:self.alertTitleLabel]; 68 | 69 | CGFloat contentLabelWidth = kAlertWidth - 16; 70 | self.alertContentLabel = [[UILabel alloc] initWithFrame:CGRectMake((kAlertWidth - contentLabelWidth) * 0.5, CGRectGetMaxY(self.alertTitleLabel.frame), contentLabelWidth, 60)]; 71 | self.alertContentLabel.numberOfLines = 0; 72 | self.alertContentLabel.textAlignment = self.alertTitleLabel.textAlignment = NSTextAlignmentCenter; 73 | self.alertContentLabel.textColor = [UIColor colorWithRed:127.0/255.0 green:127.0/255.0 blue:127.0/255.0 alpha:1]; 74 | self.alertContentLabel.font = [UIFont systemFontOfSize:15.0f]; 75 | [self addSubview:self.alertContentLabel]; 76 | 77 | CGRect leftBtnFrame; 78 | CGRect rightBtnFrame; 79 | #define kSingleButtonWidth 160.0f 80 | #define kCoupleButtonWidth 107.0f 81 | #define kButtonHeight 40.0f 82 | #define kButtonBottomOffset 10.0f 83 | if (!leftTitle) { 84 | rightBtnFrame = CGRectMake((kAlertWidth - kSingleButtonWidth) * 0.5, kAlertHeight - kButtonBottomOffset - kButtonHeight, kSingleButtonWidth, kButtonHeight); 85 | self.rightBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 86 | self.rightBtn.frame = rightBtnFrame; 87 | 88 | }else { 89 | leftBtnFrame = CGRectMake((kAlertWidth - 2 * kCoupleButtonWidth - kButtonBottomOffset) * 0.5, kAlertHeight - kButtonBottomOffset - kButtonHeight, kCoupleButtonWidth, kButtonHeight); 90 | rightBtnFrame = CGRectMake(CGRectGetMaxX(leftBtnFrame) + kButtonBottomOffset, kAlertHeight - kButtonBottomOffset - kButtonHeight, kCoupleButtonWidth, kButtonHeight); 91 | self.leftBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 92 | self.rightBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 93 | self.leftBtn.frame = leftBtnFrame; 94 | self.rightBtn.frame = rightBtnFrame; 95 | } 96 | 97 | [self.rightBtn setBackgroundImage:[UIImage imageWithColor:[UIColor colorWithRed:87.0/255.0 green:135.0/255.0 blue:173.0/255.0 alpha:1]] forState:UIControlStateNormal]; 98 | [self.leftBtn setBackgroundImage:[UIImage imageWithColor:[UIColor colorWithRed:227.0/255.0 green:100.0/255.0 blue:83.0/255.0 alpha:1]] forState:UIControlStateNormal]; 99 | [self.rightBtn setTitle:rigthTitle forState:UIControlStateNormal]; 100 | [self.leftBtn setTitle:leftTitle forState:UIControlStateNormal]; 101 | self.leftBtn.titleLabel.font = self.rightBtn.titleLabel.font = [UIFont boldSystemFontOfSize:14]; 102 | [self.leftBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 103 | [self.rightBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 104 | 105 | [self.leftBtn addTarget:self action:@selector(leftBtnClicked:) forControlEvents:UIControlEventTouchUpInside]; 106 | [self.rightBtn addTarget:self action:@selector(rightBtnClicked:) forControlEvents:UIControlEventTouchUpInside]; 107 | self.leftBtn.layer.masksToBounds = self.rightBtn.layer.masksToBounds = YES; 108 | self.leftBtn.layer.cornerRadius = self.rightBtn.layer.cornerRadius = 3.0; 109 | [self addSubview:self.leftBtn]; 110 | [self addSubview:self.rightBtn]; 111 | 112 | self.alertTitleLabel.text = title; 113 | self.alertContentLabel.text = content; 114 | 115 | UIButton *xButton = [UIButton buttonWithType:UIButtonTypeCustom]; 116 | [xButton setImage:[UIImage imageNamed:@"btn_close_normal.png"] forState:UIControlStateNormal]; 117 | [xButton setImage:[UIImage imageNamed:@"btn_close_selected.png"] forState:UIControlStateHighlighted]; 118 | xButton.frame = CGRectMake(kAlertWidth - 32, 0, 32, 32); 119 | [self addSubview:xButton]; 120 | [xButton addTarget:self action:@selector(dismissAlert) forControlEvents:UIControlEventTouchUpInside]; 121 | 122 | self.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin; 123 | } 124 | return self; 125 | } 126 | 127 | - (void)leftBtnClicked:(id)sender 128 | { 129 | _leftLeave = YES; 130 | [self dismissAlert]; 131 | if (self.leftBlock) { 132 | self.leftBlock(); 133 | } 134 | } 135 | 136 | - (void)rightBtnClicked:(id)sender 137 | { 138 | _leftLeave = NO; 139 | [self dismissAlert]; 140 | if (self.rightBlock) { 141 | self.rightBlock(); 142 | } 143 | } 144 | 145 | - (void)show 146 | { 147 | UIViewController *topVC = [self appRootViewController]; 148 | self.frame = CGRectMake((CGRectGetWidth(topVC.view.bounds) - kAlertWidth) * 0.5, - kAlertHeight - 30, kAlertWidth, kAlertHeight); 149 | [topVC.view addSubview:self]; 150 | } 151 | 152 | - (void)dismissAlert 153 | { 154 | [self removeFromSuperview]; 155 | if (self.dismissBlock) { 156 | self.dismissBlock(); 157 | } 158 | } 159 | 160 | - (UIViewController *)appRootViewController 161 | { 162 | UIViewController *appRootVC = [UIApplication sharedApplication].keyWindow.rootViewController; 163 | UIViewController *topVC = appRootVC; 164 | while (topVC.presentedViewController) { 165 | topVC = topVC.presentedViewController; 166 | } 167 | return topVC; 168 | } 169 | 170 | 171 | - (void)removeFromSuperview 172 | { 173 | [self.backImageView removeFromSuperview]; 174 | self.backImageView = nil; 175 | UIViewController *topVC = [self appRootViewController]; 176 | CGRect afterFrame = CGRectMake((CGRectGetWidth(topVC.view.bounds) - kAlertWidth) * 0.5, CGRectGetHeight(topVC.view.bounds), kAlertWidth, kAlertHeight); 177 | 178 | [UIView animateWithDuration:0.35f delay:0.0 options:UIViewAnimationOptionCurveEaseOut animations:^{ 179 | self.frame = afterFrame; 180 | if (_leftLeave) { 181 | self.transform = CGAffineTransformMakeRotation(-M_1_PI / 1.5); 182 | }else { 183 | self.transform = CGAffineTransformMakeRotation(M_1_PI / 1.5); 184 | } 185 | } completion:^(BOOL finished) { 186 | [super removeFromSuperview]; 187 | }]; 188 | } 189 | 190 | - (void)willMoveToSuperview:(UIView *)newSuperview 191 | { 192 | if (newSuperview == nil) { 193 | return; 194 | } 195 | UIViewController *topVC = [self appRootViewController]; 196 | 197 | if (!self.backImageView) { 198 | self.backImageView = [[UIView alloc] initWithFrame:topVC.view.bounds]; 199 | self.backImageView.backgroundColor = [UIColor blackColor]; 200 | self.backImageView.alpha = 0.6f; 201 | self.backImageView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; 202 | } 203 | [topVC.view addSubview:self.backImageView]; 204 | self.transform = CGAffineTransformMakeRotation(-M_1_PI / 2); 205 | CGRect afterFrame = CGRectMake((CGRectGetWidth(topVC.view.bounds) - kAlertWidth) * 0.5, (CGRectGetHeight(topVC.view.bounds) - kAlertHeight) * 0.5, kAlertWidth, kAlertHeight); 206 | [UIView animateWithDuration:0.35f delay:0.0 options:UIViewAnimationOptionCurveEaseIn animations:^{ 207 | self.transform = CGAffineTransformMakeRotation(0); 208 | self.frame = afterFrame; 209 | } completion:^(BOOL finished) { 210 | }]; 211 | [super willMoveToSuperview:newSuperview]; 212 | } 213 | 214 | @end 215 | 216 | @implementation UIImage (colorful) 217 | 218 | + (UIImage *)imageWithColor:(UIColor *)color 219 | { 220 | CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f); 221 | UIGraphicsBeginImageContext(rect.size); 222 | CGContextRef context = UIGraphicsGetCurrentContext(); 223 | 224 | CGContextSetFillColorWithColor(context, [color CGColor]); 225 | CGContextFillRect(context, rect); 226 | 227 | UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); 228 | UIGraphicsEndImageContext(); 229 | 230 | return image; 231 | } 232 | 233 | @end 234 | -------------------------------------------------------------------------------- /Vendor/btn_close_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiekw2010/DXAlertView/9e5f9c531d2dfe1b12f3fd0c967cef86d4478736/Vendor/btn_close_normal.png -------------------------------------------------------------------------------- /Vendor/btn_close_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiekw2010/DXAlertView/9e5f9c531d2dfe1b12f3fd0c967cef86d4478736/Vendor/btn_close_normal@2x.png -------------------------------------------------------------------------------- /Vendor/btn_close_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiekw2010/DXAlertView/9e5f9c531d2dfe1b12f3fd0c967cef86d4478736/Vendor/btn_close_selected.png -------------------------------------------------------------------------------- /Vendor/btn_close_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiekw2010/DXAlertView/9e5f9c531d2dfe1b12f3fd0c967cef86d4478736/Vendor/btn_close_selected@2x.png --------------------------------------------------------------------------------