├── .gitignore ├── Default-568h@2x.png ├── LICENSE ├── PopupViewTest.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata ├── sonson.mode1v3 ├── sonson.pbxuser └── xcuserdata │ └── sonson.xcuserdatad │ └── xcschemes │ ├── PopupViewTest.xcscheme │ └── xcschememanagement.plist ├── PopupViewTest ├── PopupViewTest-Info.plist ├── PopupViewTestAppDelegate.h ├── PopupViewTestAppDelegate.m ├── PopupViewTestViewController.h ├── PopupViewTestViewController.m ├── PopupViewTest_Prefix.pch ├── Resources │ ├── 2tchSmall.png │ ├── MainWindow.xib │ ├── PopupViewTestViewController.xib │ ├── iPad │ │ └── MainWindow-iPad.xib │ └── image │ │ ├── Default.png │ │ ├── Default@2x.png │ │ ├── icon114x114.png │ │ ├── icon57x57.png │ │ └── icon72x72.png └── main.m ├── README.md ├── UZPopupView.xcodeproj └── project.pbxproj ├── UZPopupView ├── Info.plist ├── UZPopupView.h └── UZPopupView.m └── sd201206.pdf /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | xcuserdata/ 3 | xcshareddata/ 4 | project.xcworkspace/ 5 | -------------------------------------------------------------------------------- /Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/PopupView/24c66f3faf3f6c4f10eea70b54f3e1fa37d2f8f6/Default-568h@2x.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | PopupView Copyright (c) 2011, Yuichi Yoshida All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the docume ntation and/or other materials provided with the distribution. - Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUD ING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN N O EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR C ONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR P ROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBI LITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /PopupViewTest.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1427AFDF127F02840082F84D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1427AFDE127F02840082F84D /* QuartzCore.framework */; }; 11 | 143F9FFF139756270008ACE0 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 143F9FF5139756270008ACE0 /* main.m */; }; 12 | 143FA002139756270008ACE0 /* PopupViewTestAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 143F9FFA139756270008ACE0 /* PopupViewTestAppDelegate.m */; }; 13 | 143FA003139756270008ACE0 /* PopupViewTestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 143F9FFC139756270008ACE0 /* PopupViewTestViewController.m */; }; 14 | 14B7E42313BD9DB5007C8935 /* MainWindow-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 14B7E42213BD9DB5007C8935 /* MainWindow-iPad.xib */; }; 15 | 14FDABA013977B3E008BF9D5 /* 2tchSmall.png in Resources */ = {isa = PBXBuildFile; fileRef = 14FDAB9713977B3E008BF9D5 /* 2tchSmall.png */; }; 16 | 14FDABA113977B3E008BF9D5 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 14FDAB9913977B3E008BF9D5 /* Default.png */; }; 17 | 14FDABA213977B3E008BF9D5 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 14FDAB9A13977B3E008BF9D5 /* Default@2x.png */; }; 18 | 14FDABA313977B3E008BF9D5 /* icon114x114.png in Resources */ = {isa = PBXBuildFile; fileRef = 14FDAB9B13977B3E008BF9D5 /* icon114x114.png */; }; 19 | 14FDABA413977B3E008BF9D5 /* icon57x57.png in Resources */ = {isa = PBXBuildFile; fileRef = 14FDAB9C13977B3E008BF9D5 /* icon57x57.png */; }; 20 | 14FDABA513977B3E008BF9D5 /* icon72x72.png in Resources */ = {isa = PBXBuildFile; fileRef = 14FDAB9D13977B3E008BF9D5 /* icon72x72.png */; }; 21 | 14FDABA613977B3E008BF9D5 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 14FDAB9E13977B3E008BF9D5 /* MainWindow.xib */; }; 22 | 14FDABA713977B3E008BF9D5 /* PopupViewTestViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 14FDAB9F13977B3E008BF9D5 /* PopupViewTestViewController.xib */; }; 23 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 24 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 25 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; 26 | 3A0DCD7C23E1FF8E002FDF2D /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3A0DCD7B23E1FF8E002FDF2D /* Default-568h@2x.png */; }; 27 | 3A0DCDAB23E26D51002FDF2D /* UZPopupView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A0DCDA723E26CF9002FDF2D /* UZPopupView.framework */; }; 28 | 3A0DCDAC23E26D51002FDF2D /* UZPopupView.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3A0DCDA723E26CF9002FDF2D /* UZPopupView.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 29 | 3A4456CC23E2825F00DE4D1F /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 3A4456CB23E2825F00DE4D1F /* README.md */; }; 30 | /* End PBXBuildFile section */ 31 | 32 | /* Begin PBXContainerItemProxy section */ 33 | 3A0DCDA623E26CF9002FDF2D /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = 3A0DCDA223E26CF9002FDF2D /* UZPopupView.xcodeproj */; 36 | proxyType = 2; 37 | remoteGlobalIDString = 3A0DCD9523E26998002FDF2D; 38 | remoteInfo = UZPopupView; 39 | }; 40 | 3A0DCDA823E26D37002FDF2D /* PBXContainerItemProxy */ = { 41 | isa = PBXContainerItemProxy; 42 | containerPortal = 3A0DCDA223E26CF9002FDF2D /* UZPopupView.xcodeproj */; 43 | proxyType = 1; 44 | remoteGlobalIDString = 3A0DCD9423E26998002FDF2D; 45 | remoteInfo = UZPopupView; 46 | }; 47 | /* End PBXContainerItemProxy section */ 48 | 49 | /* Begin PBXCopyFilesBuildPhase section */ 50 | 3A0DCDAD23E26D51002FDF2D /* Embed Frameworks */ = { 51 | isa = PBXCopyFilesBuildPhase; 52 | buildActionMask = 2147483647; 53 | dstPath = ""; 54 | dstSubfolderSpec = 10; 55 | files = ( 56 | 3A0DCDAC23E26D51002FDF2D /* UZPopupView.framework in Embed Frameworks */, 57 | ); 58 | name = "Embed Frameworks"; 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXCopyFilesBuildPhase section */ 62 | 63 | /* Begin PBXFileReference section */ 64 | 1427AFDE127F02840082F84D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 65 | 143F9FF5139756270008ACE0 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = PopupViewTest/main.m; sourceTree = SOURCE_ROOT; }; 66 | 143F9FF7139756270008ACE0 /* PopupViewTest_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PopupViewTest_Prefix.pch; path = PopupViewTest/PopupViewTest_Prefix.pch; sourceTree = SOURCE_ROOT; }; 67 | 143F9FF8139756270008ACE0 /* PopupViewTest-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "PopupViewTest-Info.plist"; path = "PopupViewTest/PopupViewTest-Info.plist"; sourceTree = SOURCE_ROOT; }; 68 | 143F9FF9139756270008ACE0 /* PopupViewTestAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PopupViewTestAppDelegate.h; path = PopupViewTest/PopupViewTestAppDelegate.h; sourceTree = SOURCE_ROOT; }; 69 | 143F9FFA139756270008ACE0 /* PopupViewTestAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PopupViewTestAppDelegate.m; path = PopupViewTest/PopupViewTestAppDelegate.m; sourceTree = SOURCE_ROOT; }; 70 | 143F9FFB139756270008ACE0 /* PopupViewTestViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PopupViewTestViewController.h; path = PopupViewTest/PopupViewTestViewController.h; sourceTree = SOURCE_ROOT; }; 71 | 143F9FFC139756270008ACE0 /* PopupViewTestViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PopupViewTestViewController.m; path = PopupViewTest/PopupViewTestViewController.m; sourceTree = SOURCE_ROOT; }; 72 | 14B7E42213BD9DB5007C8935 /* MainWindow-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "MainWindow-iPad.xib"; path = "PopupViewTest/Resources/iPad/MainWindow-iPad.xib"; sourceTree = ""; }; 73 | 14FDAB9713977B3E008BF9D5 /* 2tchSmall.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 2tchSmall.png; sourceTree = ""; }; 74 | 14FDAB9913977B3E008BF9D5 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 75 | 14FDAB9A13977B3E008BF9D5 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; 76 | 14FDAB9B13977B3E008BF9D5 /* icon114x114.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon114x114.png; sourceTree = ""; }; 77 | 14FDAB9C13977B3E008BF9D5 /* icon57x57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon57x57.png; sourceTree = ""; }; 78 | 14FDAB9D13977B3E008BF9D5 /* icon72x72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon72x72.png; sourceTree = ""; }; 79 | 14FDAB9E13977B3E008BF9D5 /* MainWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 80 | 14FDAB9F13977B3E008BF9D5 /* PopupViewTestViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PopupViewTestViewController.xib; sourceTree = ""; }; 81 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 82 | 1D6058910D05DD3D006BFB54 /* PopupViewTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PopupViewTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; 83 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 84 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 85 | 3A0DCD7B23E1FF8E002FDF2D /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 86 | 3A0DCDA223E26CF9002FDF2D /* UZPopupView.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = UZPopupView.xcodeproj; sourceTree = SOURCE_ROOT; }; 87 | 3A4456CB23E2825F00DE4D1F /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 88 | /* End PBXFileReference section */ 89 | 90 | /* Begin PBXFrameworksBuildPhase section */ 91 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 92 | isa = PBXFrameworksBuildPhase; 93 | buildActionMask = 2147483647; 94 | files = ( 95 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 96 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 97 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, 98 | 3A0DCDAB23E26D51002FDF2D /* UZPopupView.framework in Frameworks */, 99 | 1427AFDF127F02840082F84D /* QuartzCore.framework in Frameworks */, 100 | ); 101 | runOnlyForDeploymentPostprocessing = 0; 102 | }; 103 | /* End PBXFrameworksBuildPhase section */ 104 | 105 | /* Begin PBXGroup section */ 106 | 080E96DDFE201D6D7F000001 /* Classes */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 143F9FF5139756270008ACE0 /* main.m */, 110 | 143F9FF7139756270008ACE0 /* PopupViewTest_Prefix.pch */, 111 | 143F9FF8139756270008ACE0 /* PopupViewTest-Info.plist */, 112 | 143F9FF9139756270008ACE0 /* PopupViewTestAppDelegate.h */, 113 | 143F9FFA139756270008ACE0 /* PopupViewTestAppDelegate.m */, 114 | 143F9FFB139756270008ACE0 /* PopupViewTestViewController.h */, 115 | 143F9FFC139756270008ACE0 /* PopupViewTestViewController.m */, 116 | ); 117 | path = Classes; 118 | sourceTree = ""; 119 | }; 120 | 14B7E42113BD9DB1007C8935 /* iPad */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 14B7E42213BD9DB5007C8935 /* MainWindow-iPad.xib */, 124 | ); 125 | name = iPad; 126 | sourceTree = ""; 127 | }; 128 | 14FDAB9613977B3E008BF9D5 /* Resources */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 14FDAB9713977B3E008BF9D5 /* 2tchSmall.png */, 132 | 14FDAB9813977B3E008BF9D5 /* image */, 133 | 14FDAB9E13977B3E008BF9D5 /* MainWindow.xib */, 134 | 14FDAB9F13977B3E008BF9D5 /* PopupViewTestViewController.xib */, 135 | ); 136 | name = Resources; 137 | path = PopupViewTest/Resources; 138 | sourceTree = ""; 139 | }; 140 | 14FDAB9813977B3E008BF9D5 /* image */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | 14FDAB9913977B3E008BF9D5 /* Default.png */, 144 | 14FDAB9A13977B3E008BF9D5 /* Default@2x.png */, 145 | 14FDAB9B13977B3E008BF9D5 /* icon114x114.png */, 146 | 14FDAB9C13977B3E008BF9D5 /* icon57x57.png */, 147 | 14FDAB9D13977B3E008BF9D5 /* icon72x72.png */, 148 | ); 149 | path = image; 150 | sourceTree = ""; 151 | }; 152 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 1D6058910D05DD3D006BFB54 /* PopupViewTest.app */, 156 | ); 157 | name = Products; 158 | sourceTree = ""; 159 | }; 160 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | 3A4456CB23E2825F00DE4D1F /* README.md */, 164 | 3A0DCDA223E26CF9002FDF2D /* UZPopupView.xcodeproj */, 165 | 3A0DCD7B23E1FF8E002FDF2D /* Default-568h@2x.png */, 166 | 080E96DDFE201D6D7F000001 /* Classes */, 167 | 14FDAB9613977B3E008BF9D5 /* Resources */, 168 | 14B7E42113BD9DB1007C8935 /* iPad */, 169 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 170 | 19C28FACFE9D520D11CA2CBB /* Products */, 171 | ); 172 | name = CustomTemplate; 173 | sourceTree = ""; 174 | }; 175 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 176 | isa = PBXGroup; 177 | children = ( 178 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 179 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 180 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */, 181 | 1427AFDE127F02840082F84D /* QuartzCore.framework */, 182 | ); 183 | name = Frameworks; 184 | sourceTree = ""; 185 | }; 186 | 3A0DCDA323E26CF9002FDF2D /* Products */ = { 187 | isa = PBXGroup; 188 | children = ( 189 | 3A0DCDA723E26CF9002FDF2D /* UZPopupView.framework */, 190 | ); 191 | name = Products; 192 | sourceTree = ""; 193 | }; 194 | /* End PBXGroup section */ 195 | 196 | /* Begin PBXNativeTarget section */ 197 | 1D6058900D05DD3D006BFB54 /* PopupViewTest */ = { 198 | isa = PBXNativeTarget; 199 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "PopupViewTest" */; 200 | buildPhases = ( 201 | 1D60588D0D05DD3D006BFB54 /* Resources */, 202 | 1D60588E0D05DD3D006BFB54 /* Sources */, 203 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 204 | 3A0DCDAD23E26D51002FDF2D /* Embed Frameworks */, 205 | ); 206 | buildRules = ( 207 | ); 208 | dependencies = ( 209 | 3A0DCDA923E26D37002FDF2D /* PBXTargetDependency */, 210 | ); 211 | name = PopupViewTest; 212 | productName = PopupViewTest; 213 | productReference = 1D6058910D05DD3D006BFB54 /* PopupViewTest.app */; 214 | productType = "com.apple.product-type.application"; 215 | }; 216 | /* End PBXNativeTarget section */ 217 | 218 | /* Begin PBXProject section */ 219 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 220 | isa = PBXProject; 221 | attributes = { 222 | LastUpgradeCheck = 1110; 223 | }; 224 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PopupViewTest" */; 225 | compatibilityVersion = "Xcode 3.2"; 226 | developmentRegion = en; 227 | hasScannedForEncodings = 1; 228 | knownRegions = ( 229 | Base, 230 | fr, 231 | ja, 232 | de, 233 | en, 234 | ); 235 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 236 | projectDirPath = ""; 237 | projectReferences = ( 238 | { 239 | ProductGroup = 3A0DCDA323E26CF9002FDF2D /* Products */; 240 | ProjectRef = 3A0DCDA223E26CF9002FDF2D /* UZPopupView.xcodeproj */; 241 | }, 242 | ); 243 | projectRoot = ""; 244 | targets = ( 245 | 1D6058900D05DD3D006BFB54 /* PopupViewTest */, 246 | ); 247 | }; 248 | /* End PBXProject section */ 249 | 250 | /* Begin PBXReferenceProxy section */ 251 | 3A0DCDA723E26CF9002FDF2D /* UZPopupView.framework */ = { 252 | isa = PBXReferenceProxy; 253 | fileType = wrapper.framework; 254 | path = UZPopupView.framework; 255 | remoteRef = 3A0DCDA623E26CF9002FDF2D /* PBXContainerItemProxy */; 256 | sourceTree = BUILT_PRODUCTS_DIR; 257 | }; 258 | /* End PBXReferenceProxy section */ 259 | 260 | /* Begin PBXResourcesBuildPhase section */ 261 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 262 | isa = PBXResourcesBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | 14FDABA013977B3E008BF9D5 /* 2tchSmall.png in Resources */, 266 | 14FDABA113977B3E008BF9D5 /* Default.png in Resources */, 267 | 14FDABA213977B3E008BF9D5 /* Default@2x.png in Resources */, 268 | 3A0DCD7C23E1FF8E002FDF2D /* Default-568h@2x.png in Resources */, 269 | 14FDABA313977B3E008BF9D5 /* icon114x114.png in Resources */, 270 | 14FDABA413977B3E008BF9D5 /* icon57x57.png in Resources */, 271 | 14FDABA513977B3E008BF9D5 /* icon72x72.png in Resources */, 272 | 14FDABA613977B3E008BF9D5 /* MainWindow.xib in Resources */, 273 | 14FDABA713977B3E008BF9D5 /* PopupViewTestViewController.xib in Resources */, 274 | 3A4456CC23E2825F00DE4D1F /* README.md in Resources */, 275 | 14B7E42313BD9DB5007C8935 /* MainWindow-iPad.xib in Resources */, 276 | ); 277 | runOnlyForDeploymentPostprocessing = 0; 278 | }; 279 | /* End PBXResourcesBuildPhase section */ 280 | 281 | /* Begin PBXSourcesBuildPhase section */ 282 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 283 | isa = PBXSourcesBuildPhase; 284 | buildActionMask = 2147483647; 285 | files = ( 286 | 143F9FFF139756270008ACE0 /* main.m in Sources */, 287 | 143FA002139756270008ACE0 /* PopupViewTestAppDelegate.m in Sources */, 288 | 143FA003139756270008ACE0 /* PopupViewTestViewController.m in Sources */, 289 | ); 290 | runOnlyForDeploymentPostprocessing = 0; 291 | }; 292 | /* End PBXSourcesBuildPhase section */ 293 | 294 | /* Begin PBXTargetDependency section */ 295 | 3A0DCDA923E26D37002FDF2D /* PBXTargetDependency */ = { 296 | isa = PBXTargetDependency; 297 | name = UZPopupView; 298 | targetProxy = 3A0DCDA823E26D37002FDF2D /* PBXContainerItemProxy */; 299 | }; 300 | /* End PBXTargetDependency section */ 301 | 302 | /* Begin XCBuildConfiguration section */ 303 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 304 | isa = XCBuildConfiguration; 305 | buildSettings = { 306 | ALWAYS_SEARCH_USER_PATHS = NO; 307 | CLANG_ENABLE_OBJC_ARC = YES; 308 | COPY_PHASE_STRIP = NO; 309 | DEVELOPMENT_TEAM = ""; 310 | GCC_DYNAMIC_NO_PIC = NO; 311 | GCC_OPTIMIZATION_LEVEL = 0; 312 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 313 | GCC_PREFIX_HEADER = ./PopupViewTest/PopupViewTest_Prefix.pch; 314 | INFOPLIST_FILE = "./PopupViewTest/PopupViewTest-Info.plist"; 315 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 316 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 317 | PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.PopupViewTest; 318 | PRODUCT_NAME = PopupViewTest; 319 | TARGETED_DEVICE_FAMILY = "1,2"; 320 | }; 321 | name = Debug; 322 | }; 323 | 1D6058950D05DD3E006BFB54 /* Release */ = { 324 | isa = XCBuildConfiguration; 325 | buildSettings = { 326 | ALWAYS_SEARCH_USER_PATHS = NO; 327 | CLANG_ENABLE_OBJC_ARC = YES; 328 | COPY_PHASE_STRIP = YES; 329 | DEVELOPMENT_TEAM = ""; 330 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 331 | GCC_PREFIX_HEADER = ./PopupViewTest/PopupViewTest_Prefix.pch; 332 | INFOPLIST_FILE = "./PopupViewTest/PopupViewTest-Info.plist"; 333 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 334 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 335 | PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.PopupViewTest; 336 | PRODUCT_NAME = PopupViewTest; 337 | TARGETED_DEVICE_FAMILY = "1,2"; 338 | VALIDATE_PRODUCT = YES; 339 | }; 340 | name = Release; 341 | }; 342 | C01FCF4F08A954540054247B /* Debug */ = { 343 | isa = XCBuildConfiguration; 344 | buildSettings = { 345 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 346 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 347 | CLANG_WARN_BOOL_CONVERSION = YES; 348 | CLANG_WARN_COMMA = YES; 349 | CLANG_WARN_CONSTANT_CONVERSION = YES; 350 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 351 | CLANG_WARN_EMPTY_BODY = YES; 352 | CLANG_WARN_ENUM_CONVERSION = YES; 353 | CLANG_WARN_INFINITE_RECURSION = YES; 354 | CLANG_WARN_INT_CONVERSION = YES; 355 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 356 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 357 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 358 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 359 | CLANG_WARN_STRICT_PROTOTYPES = YES; 360 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 361 | CLANG_WARN_UNREACHABLE_CODE = YES; 362 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 363 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 364 | ENABLE_STRICT_OBJC_MSGSEND = YES; 365 | ENABLE_TESTABILITY = YES; 366 | GCC_C_LANGUAGE_STANDARD = c99; 367 | GCC_NO_COMMON_BLOCKS = YES; 368 | GCC_PREPROCESSOR_DEFINITIONS = _DEBUG; 369 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 370 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 371 | GCC_WARN_UNDECLARED_SELECTOR = YES; 372 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 373 | GCC_WARN_UNUSED_FUNCTION = YES; 374 | GCC_WARN_UNUSED_VARIABLE = YES; 375 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 376 | ONLY_ACTIVE_ARCH = YES; 377 | SDKROOT = iphoneos; 378 | }; 379 | name = Debug; 380 | }; 381 | C01FCF5008A954540054247B /* Release */ = { 382 | isa = XCBuildConfiguration; 383 | buildSettings = { 384 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 385 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 386 | CLANG_WARN_BOOL_CONVERSION = YES; 387 | CLANG_WARN_COMMA = YES; 388 | CLANG_WARN_CONSTANT_CONVERSION = YES; 389 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 390 | CLANG_WARN_EMPTY_BODY = YES; 391 | CLANG_WARN_ENUM_CONVERSION = YES; 392 | CLANG_WARN_INFINITE_RECURSION = YES; 393 | CLANG_WARN_INT_CONVERSION = YES; 394 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 395 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 396 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 397 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 398 | CLANG_WARN_STRICT_PROTOTYPES = YES; 399 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 400 | CLANG_WARN_UNREACHABLE_CODE = YES; 401 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 402 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 403 | ENABLE_STRICT_OBJC_MSGSEND = YES; 404 | GCC_C_LANGUAGE_STANDARD = c99; 405 | GCC_NO_COMMON_BLOCKS = YES; 406 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 407 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 408 | GCC_WARN_UNDECLARED_SELECTOR = YES; 409 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 410 | GCC_WARN_UNUSED_FUNCTION = YES; 411 | GCC_WARN_UNUSED_VARIABLE = YES; 412 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 413 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 414 | SDKROOT = iphoneos; 415 | }; 416 | name = Release; 417 | }; 418 | /* End XCBuildConfiguration section */ 419 | 420 | /* Begin XCConfigurationList section */ 421 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "PopupViewTest" */ = { 422 | isa = XCConfigurationList; 423 | buildConfigurations = ( 424 | 1D6058940D05DD3E006BFB54 /* Debug */, 425 | 1D6058950D05DD3E006BFB54 /* Release */, 426 | ); 427 | defaultConfigurationIsVisible = 0; 428 | defaultConfigurationName = Release; 429 | }; 430 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PopupViewTest" */ = { 431 | isa = XCConfigurationList; 432 | buildConfigurations = ( 433 | C01FCF4F08A954540054247B /* Debug */, 434 | C01FCF5008A954540054247B /* Release */, 435 | ); 436 | defaultConfigurationIsVisible = 0; 437 | defaultConfigurationName = Release; 438 | }; 439 | /* End XCConfigurationList section */ 440 | }; 441 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 442 | } 443 | -------------------------------------------------------------------------------- /PopupViewTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PopupViewTest.xcodeproj/sonson.mode1v3: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ActivePerspectiveName 6 | Project 7 | AllowedModules 8 | 9 | 10 | BundleLoadPath 11 | 12 | MaxInstances 13 | n 14 | Module 15 | PBXSmartGroupTreeModule 16 | Name 17 | Groups and Files Outline View 18 | 19 | 20 | BundleLoadPath 21 | 22 | MaxInstances 23 | n 24 | Module 25 | PBXNavigatorGroup 26 | Name 27 | Editor 28 | 29 | 30 | BundleLoadPath 31 | 32 | MaxInstances 33 | n 34 | Module 35 | XCTaskListModule 36 | Name 37 | Task List 38 | 39 | 40 | BundleLoadPath 41 | 42 | MaxInstances 43 | n 44 | Module 45 | XCDetailModule 46 | Name 47 | File and Smart Group Detail Viewer 48 | 49 | 50 | BundleLoadPath 51 | 52 | MaxInstances 53 | 1 54 | Module 55 | PBXBuildResultsModule 56 | Name 57 | Detailed Build Results Viewer 58 | 59 | 60 | BundleLoadPath 61 | 62 | MaxInstances 63 | 1 64 | Module 65 | PBXProjectFindModule 66 | Name 67 | Project Batch Find Tool 68 | 69 | 70 | BundleLoadPath 71 | 72 | MaxInstances 73 | n 74 | Module 75 | XCProjectFormatConflictsModule 76 | Name 77 | Project Format Conflicts List 78 | 79 | 80 | BundleLoadPath 81 | 82 | MaxInstances 83 | n 84 | Module 85 | PBXBookmarksModule 86 | Name 87 | Bookmarks Tool 88 | 89 | 90 | BundleLoadPath 91 | 92 | MaxInstances 93 | n 94 | Module 95 | PBXClassBrowserModule 96 | Name 97 | Class Browser 98 | 99 | 100 | BundleLoadPath 101 | 102 | MaxInstances 103 | n 104 | Module 105 | PBXCVSModule 106 | Name 107 | Source Code Control Tool 108 | 109 | 110 | BundleLoadPath 111 | 112 | MaxInstances 113 | n 114 | Module 115 | PBXDebugBreakpointsModule 116 | Name 117 | Debug Breakpoints Tool 118 | 119 | 120 | BundleLoadPath 121 | 122 | MaxInstances 123 | n 124 | Module 125 | XCDockableInspector 126 | Name 127 | Inspector 128 | 129 | 130 | BundleLoadPath 131 | 132 | MaxInstances 133 | n 134 | Module 135 | PBXOpenQuicklyModule 136 | Name 137 | Open Quickly Tool 138 | 139 | 140 | BundleLoadPath 141 | 142 | MaxInstances 143 | 1 144 | Module 145 | PBXDebugSessionModule 146 | Name 147 | Debugger 148 | 149 | 150 | BundleLoadPath 151 | 152 | MaxInstances 153 | 1 154 | Module 155 | PBXDebugCLIModule 156 | Name 157 | Debug Console 158 | 159 | 160 | BundleLoadPath 161 | 162 | MaxInstances 163 | n 164 | Module 165 | XCSnapshotModule 166 | Name 167 | Snapshots Tool 168 | 169 | 170 | BundlePath 171 | /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources 172 | Description 173 | DefaultDescriptionKey 174 | DockingSystemVisible 175 | 176 | Extension 177 | mode1v3 178 | FavBarConfig 179 | 180 | PBXProjectModuleGUID 181 | 1486DB321271691800AC043E 182 | XCBarModuleItemNames 183 | 184 | XCBarModuleItems 185 | 186 | 187 | FirstTimeWindowDisplayed 188 | 189 | Identifier 190 | com.apple.perspectives.project.mode1v3 191 | MajorVersion 192 | 33 193 | MinorVersion 194 | 0 195 | Name 196 | Default 197 | Notifications 198 | 199 | OpenEditors 200 | 201 | PerspectiveWidths 202 | 203 | -1 204 | -1 205 | 206 | Perspectives 207 | 208 | 209 | ChosenToolbarItems 210 | 211 | active-buildstyle-popup 212 | active-target-popup 213 | active-platform-popup 214 | active-executable-popup 215 | action 216 | NSToolbarFlexibleSpaceItem 217 | debugger-enable-breakpoints 218 | build-and-go 219 | com.apple.ide.PBXToolbarStopButton 220 | get-info 221 | toggle-editor 222 | servicesModuleRefactoring 223 | NSToolbarFlexibleSpaceItem 224 | com.apple.pbx.toolbar.searchfield 225 | 226 | ControllerClassBaseName 227 | 228 | IconName 229 | WindowOfProjectWithEditor 230 | Identifier 231 | perspective.project 232 | IsVertical 233 | 234 | Layout 235 | 236 | 237 | ContentConfiguration 238 | 239 | PBXBottomSmartGroupGIDs 240 | 241 | 1C37FBAC04509CD000000102 242 | 1C37FAAC04509CD000000102 243 | 1C37FABC05509CD000000102 244 | 1C37FABC05539CD112110102 245 | E2644B35053B69B200211256 246 | 1C37FABC04509CD000100104 247 | 1CC0EA4004350EF90044410B 248 | 1CC0EA4004350EF90041110B 249 | 250 | PBXProjectModuleGUID 251 | 1CE0B1FE06471DED0097A5F4 252 | PBXProjectModuleLabel 253 | Files 254 | PBXProjectStructureProvided 255 | yes 256 | PBXSmartGroupTreeModuleColumnData 257 | 258 | PBXSmartGroupTreeModuleColumnWidthsKey 259 | 260 | 165 261 | 262 | PBXSmartGroupTreeModuleColumnsKey_v4 263 | 264 | MainColumn 265 | 266 | 267 | PBXSmartGroupTreeModuleOutlineStateKey_v7 268 | 269 | PBXSmartGroupTreeModuleOutlineStateExpansionKey 270 | 271 | 29B97314FDCFA39411CA2CEA 272 | 080E96DDFE201D6D7F000001 273 | 29B97315FDCFA39411CA2CEA 274 | 29B97317FDCFA39411CA2CEA 275 | 29B97323FDCFA39411CA2CEA 276 | 19C28FACFE9D520D11CA2CBB 277 | 1C37FABC05509CD000000102 278 | 279 | PBXSmartGroupTreeModuleOutlineStateSelectionKey 280 | 281 | 282 | 0 283 | 284 | 285 | PBXSmartGroupTreeModuleOutlineStateVisibleRectKey 286 | {{0, 0}, {165, 872}} 287 | 288 | PBXTopSmartGroupGIDs 289 | 290 | XCIncludePerspectivesSwitch 291 | 292 | XCSharingToken 293 | com.apple.Xcode.GFSharingToken 294 | 295 | GeometryConfiguration 296 | 297 | Frame 298 | {{0, 0}, {182, 890}} 299 | GroupTreeTableConfiguration 300 | 301 | MainColumn 302 | 165 303 | 304 | RubberWindowFrame 305 | 625 235 1528 931 0 0 2560 1418 306 | 307 | Module 308 | PBXSmartGroupTreeModule 309 | Proportion 310 | 182pt 311 | 312 | 313 | Dock 314 | 315 | 316 | BecomeActive 317 | 318 | ContentConfiguration 319 | 320 | PBXProjectModuleGUID 321 | 1CE0B20306471E060097A5F4 322 | PBXProjectModuleLabel 323 | PopupViewTestViewController.m 324 | PBXSplitModuleInNavigatorKey 325 | 326 | Split0 327 | 328 | PBXProjectModuleGUID 329 | 1CE0B20406471E060097A5F4 330 | PBXProjectModuleLabel 331 | PopupViewTestViewController.m 332 | _historyCapacity 333 | 0 334 | bookmark 335 | 14A55AB412A39316000BF4B6 336 | history 337 | 338 | 14AFEE1C127F1D6000001F68 339 | 140FF3B1127FACFB00F62662 340 | 140FF3C6127FAE0400F62662 341 | 144633E91283EF71005F8988 342 | 144633EA1283EF71005F8988 343 | 144633F61283EFED005F8988 344 | 14A55A9F12A392C2000BF4B6 345 | 346 | 347 | SplitCount 348 | 1 349 | 350 | StatusBarVisibility 351 | 352 | 353 | GeometryConfiguration 354 | 355 | Frame 356 | {{0, 0}, {1341, 885}} 357 | RubberWindowFrame 358 | 625 235 1528 931 0 0 2560 1418 359 | 360 | Module 361 | PBXNavigatorGroup 362 | Proportion 363 | 885pt 364 | 365 | 366 | ContentConfiguration 367 | 368 | PBXProjectModuleGUID 369 | 1CE0B20506471E060097A5F4 370 | PBXProjectModuleLabel 371 | 詳細 372 | 373 | GeometryConfiguration 374 | 375 | Frame 376 | {{0, 890}, {1341, 0}} 377 | RubberWindowFrame 378 | 625 235 1528 931 0 0 2560 1418 379 | 380 | Module 381 | XCDetailModule 382 | Proportion 383 | 0pt 384 | 385 | 386 | Proportion 387 | 1341pt 388 | 389 | 390 | Name 391 | Project 392 | ServiceClasses 393 | 394 | XCModuleDock 395 | PBXSmartGroupTreeModule 396 | XCModuleDock 397 | PBXNavigatorGroup 398 | XCDetailModule 399 | 400 | TableOfContents 401 | 402 | 14A55AAF12A392C7000BF4B6 403 | 1CE0B1FE06471DED0097A5F4 404 | 14A55AB012A392C7000BF4B6 405 | 1CE0B20306471E060097A5F4 406 | 1CE0B20506471E060097A5F4 407 | 408 | ToolbarConfigUserDefaultsMinorVersion 409 | 2 410 | ToolbarConfiguration 411 | xcode.toolbar.config.defaultV3 412 | 413 | 414 | ControllerClassBaseName 415 | 416 | IconName 417 | WindowOfProject 418 | Identifier 419 | perspective.morph 420 | IsVertical 421 | 0 422 | Layout 423 | 424 | 425 | BecomeActive 426 | 1 427 | ContentConfiguration 428 | 429 | PBXBottomSmartGroupGIDs 430 | 431 | 1C37FBAC04509CD000000102 432 | 1C37FAAC04509CD000000102 433 | 1C08E77C0454961000C914BD 434 | 1C37FABC05509CD000000102 435 | 1C37FABC05539CD112110102 436 | E2644B35053B69B200211256 437 | 1C37FABC04509CD000100104 438 | 1CC0EA4004350EF90044410B 439 | 1CC0EA4004350EF90041110B 440 | 441 | PBXProjectModuleGUID 442 | 11E0B1FE06471DED0097A5F4 443 | PBXProjectModuleLabel 444 | Files 445 | PBXProjectStructureProvided 446 | yes 447 | PBXSmartGroupTreeModuleColumnData 448 | 449 | PBXSmartGroupTreeModuleColumnWidthsKey 450 | 451 | 186 452 | 453 | PBXSmartGroupTreeModuleColumnsKey_v4 454 | 455 | MainColumn 456 | 457 | 458 | PBXSmartGroupTreeModuleOutlineStateKey_v7 459 | 460 | PBXSmartGroupTreeModuleOutlineStateExpansionKey 461 | 462 | 29B97314FDCFA39411CA2CEA 463 | 1C37FABC05509CD000000102 464 | 465 | PBXSmartGroupTreeModuleOutlineStateSelectionKey 466 | 467 | 468 | 0 469 | 470 | 471 | PBXSmartGroupTreeModuleOutlineStateVisibleRectKey 472 | {{0, 0}, {186, 337}} 473 | 474 | PBXTopSmartGroupGIDs 475 | 476 | XCIncludePerspectivesSwitch 477 | 1 478 | XCSharingToken 479 | com.apple.Xcode.GFSharingToken 480 | 481 | GeometryConfiguration 482 | 483 | Frame 484 | {{0, 0}, {203, 355}} 485 | GroupTreeTableConfiguration 486 | 487 | MainColumn 488 | 186 489 | 490 | RubberWindowFrame 491 | 373 269 690 397 0 0 1440 878 492 | 493 | Module 494 | PBXSmartGroupTreeModule 495 | Proportion 496 | 100% 497 | 498 | 499 | Name 500 | Morph 501 | PreferredWidth 502 | 300 503 | ServiceClasses 504 | 505 | XCModuleDock 506 | PBXSmartGroupTreeModule 507 | 508 | TableOfContents 509 | 510 | 11E0B1FE06471DED0097A5F4 511 | 512 | ToolbarConfiguration 513 | xcode.toolbar.config.default.shortV3 514 | 515 | 516 | PerspectivesBarVisible 517 | 518 | ShelfIsVisible 519 | 520 | SourceDescription 521 | file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec' 522 | StatusbarIsVisible 523 | 524 | TimeStamp 525 | 0.0 526 | ToolbarConfigUserDefaultsMinorVersion 527 | 2 528 | ToolbarDisplayMode 529 | 2 530 | ToolbarIsVisible 531 | 532 | ToolbarSizeMode 533 | 2 534 | Type 535 | Perspectives 536 | UpdateMessage 537 | The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? 538 | WindowJustification 539 | 5 540 | WindowOrderList 541 | 542 | 14A55ABC12A39316000BF4B6 543 | 14A55ABD12A39316000BF4B6 544 | 1CD10A99069EF8BA00B06720 545 | 1486DB331271691800AC043E 546 | 1C78EAAD065D492600B07095 547 | /Users/sonson/code/PopupViewTest/PopupViewTest.xcodeproj 548 | 549 | WindowString 550 | 625 235 1528 931 0 0 2560 1418 551 | WindowToolsV3 552 | 553 | 554 | FirstTimeWindowDisplayed 555 | 556 | Identifier 557 | windowTool.build 558 | IsVertical 559 | 560 | Layout 561 | 562 | 563 | Dock 564 | 565 | 566 | ContentConfiguration 567 | 568 | PBXProjectModuleGUID 569 | 1CD0528F0623707200166675 570 | PBXProjectModuleLabel 571 | 572 | StatusBarVisibility 573 | 574 | 575 | GeometryConfiguration 576 | 577 | Frame 578 | {{0, 0}, {500, 218}} 579 | RubberWindowFrame 580 | 906 673 500 500 0 0 2560 1418 581 | 582 | Module 583 | PBXNavigatorGroup 584 | Proportion 585 | 218pt 586 | 587 | 588 | ContentConfiguration 589 | 590 | PBXProjectModuleGUID 591 | XCMainBuildResultsModuleGUID 592 | PBXProjectModuleLabel 593 | ビルド結果 594 | XCBuildResultsTrigger_Collapse 595 | 1021 596 | XCBuildResultsTrigger_Open 597 | 1011 598 | 599 | GeometryConfiguration 600 | 601 | Frame 602 | {{0, 223}, {500, 236}} 603 | RubberWindowFrame 604 | 906 673 500 500 0 0 2560 1418 605 | 606 | Module 607 | PBXBuildResultsModule 608 | Proportion 609 | 236pt 610 | 611 | 612 | Proportion 613 | 459pt 614 | 615 | 616 | Name 617 | Build Results 618 | ServiceClasses 619 | 620 | PBXBuildResultsModule 621 | 622 | StatusbarIsVisible 623 | 624 | TableOfContents 625 | 626 | 1486DB331271691800AC043E 627 | 14A55AB112A392C7000BF4B6 628 | 1CD0528F0623707200166675 629 | XCMainBuildResultsModuleGUID 630 | 631 | ToolbarConfiguration 632 | xcode.toolbar.config.buildV3 633 | WindowContentMinSize 634 | 486 300 635 | WindowString 636 | 906 673 500 500 0 0 2560 1418 637 | WindowToolGUID 638 | 1486DB331271691800AC043E 639 | WindowToolIsVisible 640 | 641 | 642 | 643 | FirstTimeWindowDisplayed 644 | 645 | Identifier 646 | windowTool.debugger 647 | IsVertical 648 | 649 | Layout 650 | 651 | 652 | Dock 653 | 654 | 655 | ContentConfiguration 656 | 657 | Debugger 658 | 659 | HorizontalSplitView 660 | 661 | _collapsingFrameDimension 662 | 0.0 663 | _indexOfCollapsedView 664 | 0 665 | _percentageOfCollapsedView 666 | 0.0 667 | isCollapsed 668 | yes 669 | sizes 670 | 671 | {{0, 0}, {527, 327}} 672 | {{527, 0}, {629, 327}} 673 | 674 | 675 | VerticalSplitView 676 | 677 | _collapsingFrameDimension 678 | 0.0 679 | _indexOfCollapsedView 680 | 0 681 | _percentageOfCollapsedView 682 | 0.0 683 | isCollapsed 684 | yes 685 | sizes 686 | 687 | {{0, 0}, {1156, 327}} 688 | {{0, 327}, {1156, 291}} 689 | 690 | 691 | 692 | LauncherConfigVersion 693 | 8 694 | PBXProjectModuleGUID 695 | 1C162984064C10D400B95A72 696 | PBXProjectModuleLabel 697 | Debug - GLUTExamples (Underwater) 698 | 699 | GeometryConfiguration 700 | 701 | DebugConsoleVisible 702 | None 703 | DebugConsoleWindowFrame 704 | {{200, 200}, {500, 300}} 705 | DebugSTDIOWindowFrame 706 | {{200, 200}, {500, 300}} 707 | Frame 708 | {{0, 0}, {1156, 618}} 709 | PBXDebugSessionStackFrameViewKey 710 | 711 | DebugVariablesTableConfiguration 712 | 713 | Name 714 | 120 715 | Value 716 | 85 717 | Summary 718 | 399 719 | 720 | Frame 721 | {{527, 0}, {629, 327}} 722 | RubberWindowFrame 723 | 668 614 1156 659 0 0 2560 1418 724 | 725 | RubberWindowFrame 726 | 668 614 1156 659 0 0 2560 1418 727 | 728 | Module 729 | PBXDebugSessionModule 730 | Proportion 731 | 618pt 732 | 733 | 734 | Proportion 735 | 618pt 736 | 737 | 738 | Name 739 | Debugger 740 | ServiceClasses 741 | 742 | PBXDebugSessionModule 743 | 744 | StatusbarIsVisible 745 | 746 | TableOfContents 747 | 748 | 1CD10A99069EF8BA00B06720 749 | 14A55AB512A39316000BF4B6 750 | 1C162984064C10D400B95A72 751 | 14A55AB612A39316000BF4B6 752 | 14A55AB712A39316000BF4B6 753 | 14A55AB812A39316000BF4B6 754 | 14A55AB912A39316000BF4B6 755 | 14A55ABA12A39316000BF4B6 756 | 757 | ToolbarConfiguration 758 | xcode.toolbar.config.debugV3 759 | WindowString 760 | 668 614 1156 659 0 0 2560 1418 761 | WindowToolGUID 762 | 1CD10A99069EF8BA00B06720 763 | WindowToolIsVisible 764 | 765 | 766 | 767 | Identifier 768 | windowTool.find 769 | Layout 770 | 771 | 772 | Dock 773 | 774 | 775 | Dock 776 | 777 | 778 | ContentConfiguration 779 | 780 | PBXProjectModuleGUID 781 | 1CDD528C0622207200134675 782 | PBXProjectModuleLabel 783 | <No Editor> 784 | PBXSplitModuleInNavigatorKey 785 | 786 | Split0 787 | 788 | PBXProjectModuleGUID 789 | 1CD0528D0623707200166675 790 | 791 | SplitCount 792 | 1 793 | 794 | StatusBarVisibility 795 | 1 796 | 797 | GeometryConfiguration 798 | 799 | Frame 800 | {{0, 0}, {781, 167}} 801 | RubberWindowFrame 802 | 62 385 781 470 0 0 1440 878 803 | 804 | Module 805 | PBXNavigatorGroup 806 | Proportion 807 | 781pt 808 | 809 | 810 | Proportion 811 | 50% 812 | 813 | 814 | BecomeActive 815 | 1 816 | ContentConfiguration 817 | 818 | PBXProjectModuleGUID 819 | 1CD0528E0623707200166675 820 | PBXProjectModuleLabel 821 | Project Find 822 | 823 | GeometryConfiguration 824 | 825 | Frame 826 | {{8, 0}, {773, 254}} 827 | RubberWindowFrame 828 | 62 385 781 470 0 0 1440 878 829 | 830 | Module 831 | PBXProjectFindModule 832 | Proportion 833 | 50% 834 | 835 | 836 | Proportion 837 | 428pt 838 | 839 | 840 | Name 841 | Project Find 842 | ServiceClasses 843 | 844 | PBXProjectFindModule 845 | 846 | StatusbarIsVisible 847 | 1 848 | TableOfContents 849 | 850 | 1C530D57069F1CE1000CFCEE 851 | 1C530D58069F1CE1000CFCEE 852 | 1C530D59069F1CE1000CFCEE 853 | 1CDD528C0622207200134675 854 | 1C530D5A069F1CE1000CFCEE 855 | 1CE0B1FE06471DED0097A5F4 856 | 1CD0528E0623707200166675 857 | 858 | WindowString 859 | 62 385 781 470 0 0 1440 878 860 | WindowToolGUID 861 | 1C530D57069F1CE1000CFCEE 862 | WindowToolIsVisible 863 | 0 864 | 865 | 866 | Identifier 867 | MENUSEPARATOR 868 | 869 | 870 | FirstTimeWindowDisplayed 871 | 872 | Identifier 873 | windowTool.debuggerConsole 874 | IsVertical 875 | 876 | Layout 877 | 878 | 879 | Dock 880 | 881 | 882 | BecomeActive 883 | 884 | ContentConfiguration 885 | 886 | PBXProjectModuleGUID 887 | 1C78EAAC065D492600B07095 888 | PBXProjectModuleLabel 889 | Debugger Console 890 | 891 | GeometryConfiguration 892 | 893 | Frame 894 | {{0, 0}, {916, 210}} 895 | RubberWindowFrame 896 | 482 1019 916 251 0 0 2560 1418 897 | 898 | Module 899 | PBXDebugCLIModule 900 | Proportion 901 | 210pt 902 | 903 | 904 | Proportion 905 | 210pt 906 | 907 | 908 | Name 909 | Debugger Console 910 | ServiceClasses 911 | 912 | PBXDebugCLIModule 913 | 914 | StatusbarIsVisible 915 | 916 | TableOfContents 917 | 918 | 1C78EAAD065D492600B07095 919 | 14A55ABB12A39316000BF4B6 920 | 1C78EAAC065D492600B07095 921 | 922 | ToolbarConfiguration 923 | xcode.toolbar.config.consoleV3 924 | WindowString 925 | 482 1019 916 251 0 0 2560 1418 926 | WindowToolGUID 927 | 1C78EAAD065D492600B07095 928 | WindowToolIsVisible 929 | 930 | 931 | 932 | Identifier 933 | windowTool.snapshots 934 | Layout 935 | 936 | 937 | Dock 938 | 939 | 940 | Module 941 | XCSnapshotModule 942 | Proportion 943 | 100% 944 | 945 | 946 | Proportion 947 | 100% 948 | 949 | 950 | Name 951 | Snapshots 952 | ServiceClasses 953 | 954 | XCSnapshotModule 955 | 956 | StatusbarIsVisible 957 | Yes 958 | ToolbarConfiguration 959 | xcode.toolbar.config.snapshots 960 | WindowString 961 | 315 824 300 550 0 0 1440 878 962 | WindowToolIsVisible 963 | Yes 964 | 965 | 966 | Identifier 967 | windowTool.scm 968 | Layout 969 | 970 | 971 | Dock 972 | 973 | 974 | ContentConfiguration 975 | 976 | PBXProjectModuleGUID 977 | 1C78EAB2065D492600B07095 978 | PBXProjectModuleLabel 979 | <No Editor> 980 | PBXSplitModuleInNavigatorKey 981 | 982 | Split0 983 | 984 | PBXProjectModuleGUID 985 | 1C78EAB3065D492600B07095 986 | 987 | SplitCount 988 | 1 989 | 990 | StatusBarVisibility 991 | 1 992 | 993 | GeometryConfiguration 994 | 995 | Frame 996 | {{0, 0}, {452, 0}} 997 | RubberWindowFrame 998 | 743 379 452 308 0 0 1280 1002 999 | 1000 | Module 1001 | PBXNavigatorGroup 1002 | Proportion 1003 | 0pt 1004 | 1005 | 1006 | BecomeActive 1007 | 1 1008 | ContentConfiguration 1009 | 1010 | PBXProjectModuleGUID 1011 | 1CD052920623707200166675 1012 | PBXProjectModuleLabel 1013 | SCM 1014 | 1015 | GeometryConfiguration 1016 | 1017 | ConsoleFrame 1018 | {{0, 259}, {452, 0}} 1019 | Frame 1020 | {{0, 7}, {452, 259}} 1021 | RubberWindowFrame 1022 | 743 379 452 308 0 0 1280 1002 1023 | TableConfiguration 1024 | 1025 | Status 1026 | 30 1027 | FileName 1028 | 199 1029 | Path 1030 | 197.0950012207031 1031 | 1032 | TableFrame 1033 | {{0, 0}, {452, 250}} 1034 | 1035 | Module 1036 | PBXCVSModule 1037 | Proportion 1038 | 262pt 1039 | 1040 | 1041 | Proportion 1042 | 266pt 1043 | 1044 | 1045 | Name 1046 | SCM 1047 | ServiceClasses 1048 | 1049 | PBXCVSModule 1050 | 1051 | StatusbarIsVisible 1052 | 1 1053 | TableOfContents 1054 | 1055 | 1C78EAB4065D492600B07095 1056 | 1C78EAB5065D492600B07095 1057 | 1C78EAB2065D492600B07095 1058 | 1CD052920623707200166675 1059 | 1060 | ToolbarConfiguration 1061 | xcode.toolbar.config.scm 1062 | WindowString 1063 | 743 379 452 308 0 0 1280 1002 1064 | 1065 | 1066 | Identifier 1067 | windowTool.breakpoints 1068 | IsVertical 1069 | 0 1070 | Layout 1071 | 1072 | 1073 | Dock 1074 | 1075 | 1076 | BecomeActive 1077 | 1 1078 | ContentConfiguration 1079 | 1080 | PBXBottomSmartGroupGIDs 1081 | 1082 | 1C77FABC04509CD000000102 1083 | 1084 | PBXProjectModuleGUID 1085 | 1CE0B1FE06471DED0097A5F4 1086 | PBXProjectModuleLabel 1087 | Files 1088 | PBXProjectStructureProvided 1089 | no 1090 | PBXSmartGroupTreeModuleColumnData 1091 | 1092 | PBXSmartGroupTreeModuleColumnWidthsKey 1093 | 1094 | 168 1095 | 1096 | PBXSmartGroupTreeModuleColumnsKey_v4 1097 | 1098 | MainColumn 1099 | 1100 | 1101 | PBXSmartGroupTreeModuleOutlineStateKey_v7 1102 | 1103 | PBXSmartGroupTreeModuleOutlineStateExpansionKey 1104 | 1105 | 1C77FABC04509CD000000102 1106 | 1107 | PBXSmartGroupTreeModuleOutlineStateSelectionKey 1108 | 1109 | 1110 | 0 1111 | 1112 | 1113 | PBXSmartGroupTreeModuleOutlineStateVisibleRectKey 1114 | {{0, 0}, {168, 350}} 1115 | 1116 | PBXTopSmartGroupGIDs 1117 | 1118 | XCIncludePerspectivesSwitch 1119 | 0 1120 | 1121 | GeometryConfiguration 1122 | 1123 | Frame 1124 | {{0, 0}, {185, 368}} 1125 | GroupTreeTableConfiguration 1126 | 1127 | MainColumn 1128 | 168 1129 | 1130 | RubberWindowFrame 1131 | 315 424 744 409 0 0 1440 878 1132 | 1133 | Module 1134 | PBXSmartGroupTreeModule 1135 | Proportion 1136 | 185pt 1137 | 1138 | 1139 | ContentConfiguration 1140 | 1141 | PBXProjectModuleGUID 1142 | 1CA1AED706398EBD00589147 1143 | PBXProjectModuleLabel 1144 | Detail 1145 | 1146 | GeometryConfiguration 1147 | 1148 | Frame 1149 | {{190, 0}, {554, 368}} 1150 | RubberWindowFrame 1151 | 315 424 744 409 0 0 1440 878 1152 | 1153 | Module 1154 | XCDetailModule 1155 | Proportion 1156 | 554pt 1157 | 1158 | 1159 | Proportion 1160 | 368pt 1161 | 1162 | 1163 | MajorVersion 1164 | 3 1165 | MinorVersion 1166 | 0 1167 | Name 1168 | Breakpoints 1169 | ServiceClasses 1170 | 1171 | PBXSmartGroupTreeModule 1172 | XCDetailModule 1173 | 1174 | StatusbarIsVisible 1175 | 1 1176 | TableOfContents 1177 | 1178 | 1CDDB66807F98D9800BB5817 1179 | 1CDDB66907F98D9800BB5817 1180 | 1CE0B1FE06471DED0097A5F4 1181 | 1CA1AED706398EBD00589147 1182 | 1183 | ToolbarConfiguration 1184 | xcode.toolbar.config.breakpointsV3 1185 | WindowString 1186 | 315 424 744 409 0 0 1440 878 1187 | WindowToolGUID 1188 | 1CDDB66807F98D9800BB5817 1189 | WindowToolIsVisible 1190 | 1 1191 | 1192 | 1193 | Identifier 1194 | windowTool.debugAnimator 1195 | Layout 1196 | 1197 | 1198 | Dock 1199 | 1200 | 1201 | Module 1202 | PBXNavigatorGroup 1203 | Proportion 1204 | 100% 1205 | 1206 | 1207 | Proportion 1208 | 100% 1209 | 1210 | 1211 | Name 1212 | Debug Visualizer 1213 | ServiceClasses 1214 | 1215 | PBXNavigatorGroup 1216 | 1217 | StatusbarIsVisible 1218 | 1 1219 | ToolbarConfiguration 1220 | xcode.toolbar.config.debugAnimatorV3 1221 | WindowString 1222 | 100 100 700 500 0 0 1280 1002 1223 | 1224 | 1225 | Identifier 1226 | windowTool.bookmarks 1227 | Layout 1228 | 1229 | 1230 | Dock 1231 | 1232 | 1233 | Module 1234 | PBXBookmarksModule 1235 | Proportion 1236 | 100% 1237 | 1238 | 1239 | Proportion 1240 | 100% 1241 | 1242 | 1243 | Name 1244 | Bookmarks 1245 | ServiceClasses 1246 | 1247 | PBXBookmarksModule 1248 | 1249 | StatusbarIsVisible 1250 | 0 1251 | WindowString 1252 | 538 42 401 187 0 0 1280 1002 1253 | 1254 | 1255 | Identifier 1256 | windowTool.projectFormatConflicts 1257 | Layout 1258 | 1259 | 1260 | Dock 1261 | 1262 | 1263 | Module 1264 | XCProjectFormatConflictsModule 1265 | Proportion 1266 | 100% 1267 | 1268 | 1269 | Proportion 1270 | 100% 1271 | 1272 | 1273 | Name 1274 | Project Format Conflicts 1275 | ServiceClasses 1276 | 1277 | XCProjectFormatConflictsModule 1278 | 1279 | StatusbarIsVisible 1280 | 0 1281 | WindowContentMinSize 1282 | 450 300 1283 | WindowString 1284 | 50 850 472 307 0 0 1440 877 1285 | 1286 | 1287 | Identifier 1288 | windowTool.classBrowser 1289 | Layout 1290 | 1291 | 1292 | Dock 1293 | 1294 | 1295 | BecomeActive 1296 | 1 1297 | ContentConfiguration 1298 | 1299 | OptionsSetName 1300 | Hierarchy, all classes 1301 | PBXProjectModuleGUID 1302 | 1CA6456E063B45B4001379D8 1303 | PBXProjectModuleLabel 1304 | Class Browser - NSObject 1305 | 1306 | GeometryConfiguration 1307 | 1308 | ClassesFrame 1309 | {{0, 0}, {374, 96}} 1310 | ClassesTreeTableConfiguration 1311 | 1312 | PBXClassNameColumnIdentifier 1313 | 208 1314 | PBXClassBookColumnIdentifier 1315 | 22 1316 | 1317 | Frame 1318 | {{0, 0}, {630, 331}} 1319 | MembersFrame 1320 | {{0, 105}, {374, 395}} 1321 | MembersTreeTableConfiguration 1322 | 1323 | PBXMemberTypeIconColumnIdentifier 1324 | 22 1325 | PBXMemberNameColumnIdentifier 1326 | 216 1327 | PBXMemberTypeColumnIdentifier 1328 | 97 1329 | PBXMemberBookColumnIdentifier 1330 | 22 1331 | 1332 | PBXModuleWindowStatusBarHidden2 1333 | 1 1334 | RubberWindowFrame 1335 | 385 179 630 352 0 0 1440 878 1336 | 1337 | Module 1338 | PBXClassBrowserModule 1339 | Proportion 1340 | 332pt 1341 | 1342 | 1343 | Proportion 1344 | 332pt 1345 | 1346 | 1347 | Name 1348 | Class Browser 1349 | ServiceClasses 1350 | 1351 | PBXClassBrowserModule 1352 | 1353 | StatusbarIsVisible 1354 | 0 1355 | TableOfContents 1356 | 1357 | 1C0AD2AF069F1E9B00FABCE6 1358 | 1C0AD2B0069F1E9B00FABCE6 1359 | 1CA6456E063B45B4001379D8 1360 | 1361 | ToolbarConfiguration 1362 | xcode.toolbar.config.classbrowser 1363 | WindowString 1364 | 385 179 630 352 0 0 1440 878 1365 | WindowToolGUID 1366 | 1C0AD2AF069F1E9B00FABCE6 1367 | WindowToolIsVisible 1368 | 0 1369 | 1370 | 1371 | Identifier 1372 | windowTool.refactoring 1373 | IncludeInToolsMenu 1374 | 0 1375 | Layout 1376 | 1377 | 1378 | Dock 1379 | 1380 | 1381 | BecomeActive 1382 | 1 1383 | GeometryConfiguration 1384 | 1385 | Frame 1386 | {0, 0}, {500, 335} 1387 | RubberWindowFrame 1388 | {0, 0}, {500, 335} 1389 | 1390 | Module 1391 | XCRefactoringModule 1392 | Proportion 1393 | 100% 1394 | 1395 | 1396 | Proportion 1397 | 100% 1398 | 1399 | 1400 | Name 1401 | Refactoring 1402 | ServiceClasses 1403 | 1404 | XCRefactoringModule 1405 | 1406 | WindowString 1407 | 200 200 500 356 0 0 1920 1200 1408 | 1409 | 1410 | 1411 | 1412 | -------------------------------------------------------------------------------- /PopupViewTest.xcodeproj/sonson.pbxuser: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | 140FF3B1127FACFB00F62662 /* PBXTextBookmark */ = { 4 | isa = PBXTextBookmark; 5 | fRef = 1D3623240D0F684500981E51 /* PopupViewTestAppDelegate.h */; 6 | name = "PopupViewTestAppDelegate.h: 18"; 7 | rLen = 56; 8 | rLoc = 362; 9 | rType = 0; 10 | vrLen = 510; 11 | vrLoc = 0; 12 | }; 13 | 140FF3C6127FAE0400F62662 /* PBXTextBookmark */ = { 14 | isa = PBXTextBookmark; 15 | fRef = 1D3623250D0F684500981E51 /* PopupViewTestAppDelegate.m */; 16 | name = "PopupViewTestAppDelegate.m: 1"; 17 | rLen = 0; 18 | rLoc = 0; 19 | rType = 0; 20 | vrLen = 2173; 21 | vrLoc = 0; 22 | }; 23 | 144633E91283EF71005F8988 /* PBXTextBookmark */ = { 24 | isa = PBXTextBookmark; 25 | fRef = 1486DB381271693B00AC043E /* SNPopupView.h */; 26 | name = "SNPopupView.h: 46"; 27 | rLen = 49; 28 | rLoc = 931; 29 | rType = 0; 30 | vrLen = 986; 31 | vrLoc = 0; 32 | }; 33 | 144633EA1283EF71005F8988 /* PBXTextBookmark */ = { 34 | isa = PBXTextBookmark; 35 | fRef = 28D7ACF60DDB3853001CB0EB /* PopupViewTestViewController.h */; 36 | name = "PopupViewTestViewController.h: 16"; 37 | rLen = 19; 38 | rLoc = 314; 39 | rType = 0; 40 | vrLen = 344; 41 | vrLoc = 0; 42 | }; 43 | 144633F61283EFED005F8988 /* PBXTextBookmark */ = { 44 | isa = PBXTextBookmark; 45 | fRef = 1486DB391271693B00AC043E /* SNPopupView.m */; 46 | name = "SNPopupView.m: 93"; 47 | rLen = 154; 48 | rLoc = 2023; 49 | rType = 0; 50 | vrLen = 1673; 51 | vrLoc = 1636; 52 | }; 53 | 1486DB261271690C00AC043E /* PopupViewTest */ = { 54 | isa = PBXExecutable; 55 | activeArgIndices = ( 56 | ); 57 | argumentStrings = ( 58 | ); 59 | autoAttachOnCrash = 1; 60 | breakpointsEnabled = 1; 61 | configStateDict = { 62 | }; 63 | customDataFormattersEnabled = 1; 64 | dataTipCustomDataFormattersEnabled = 1; 65 | dataTipShowTypeColumn = 1; 66 | dataTipSortType = 0; 67 | debuggerPlugin = GDBDebugging; 68 | disassemblyDisplayState = 0; 69 | dylibVariantSuffix = ""; 70 | enableDebugStr = 1; 71 | environmentEntries = ( 72 | ); 73 | executableSystemSymbolLevel = 0; 74 | executableUserSymbolLevel = 0; 75 | libgmallocEnabled = 0; 76 | name = PopupViewTest; 77 | savedGlobals = { 78 | }; 79 | showTypeColumn = 0; 80 | sourceDirectories = ( 81 | ); 82 | variableFormatDictionary = { 83 | }; 84 | }; 85 | 1486DB351271691800AC043E /* Source Control */ = { 86 | isa = PBXSourceControlManager; 87 | fallbackIsa = XCSourceControlManager; 88 | isSCMEnabled = 0; 89 | scmConfiguration = { 90 | repositoryNamesForRoots = { 91 | "" = ""; 92 | }; 93 | }; 94 | }; 95 | 1486DB361271691800AC043E /* Code sense */ = { 96 | isa = PBXCodeSenseManager; 97 | indexTemplatePath = ""; 98 | }; 99 | 1486DB381271693B00AC043E /* SNPopupView.h */ = { 100 | uiCtxt = { 101 | sepNavIntBoundsRect = "{{0, 0}, {1280, 830}}"; 102 | sepNavSelRange = "{931, 49}"; 103 | sepNavVisRange = "{0, 986}"; 104 | }; 105 | }; 106 | 1486DB391271693B00AC043E /* SNPopupView.m */ = { 107 | uiCtxt = { 108 | sepNavIntBoundsRect = "{{0, 0}, {1280, 7868}}"; 109 | sepNavSelRange = "{2023, 154}"; 110 | sepNavVisRange = "{1636, 1673}"; 111 | }; 112 | }; 113 | 14A55A9F12A392C2000BF4B6 /* PBXTextBookmark */ = { 114 | isa = PBXTextBookmark; 115 | fRef = 28D7ACF70DDB3853001CB0EB /* PopupViewTestViewController.m */; 116 | name = "PopupViewTestViewController.m: 25"; 117 | rLen = 0; 118 | rLoc = 519; 119 | rType = 0; 120 | vrLen = 1510; 121 | vrLoc = 93; 122 | }; 123 | 14A55AB412A39316000BF4B6 /* PBXTextBookmark */ = { 124 | isa = PBXTextBookmark; 125 | fRef = 28D7ACF70DDB3853001CB0EB /* PopupViewTestViewController.m */; 126 | name = "PopupViewTestViewController.m: 6"; 127 | rLen = 0; 128 | rLoc = 144; 129 | rType = 0; 130 | vrLen = 1547; 131 | vrLoc = 58; 132 | }; 133 | 14AFEE1C127F1D6000001F68 /* PBXTextBookmark */ = { 134 | isa = PBXTextBookmark; 135 | fRef = 32CA4F630368D1EE00C91783 /* PopupViewTest_Prefix.pch */; 136 | name = "PopupViewTest_Prefix.pch: 37"; 137 | rLen = 0; 138 | rLoc = 1468; 139 | rType = 0; 140 | vrLen = 1468; 141 | vrLoc = 0; 142 | }; 143 | 1D3623240D0F684500981E51 /* PopupViewTestAppDelegate.h */ = { 144 | uiCtxt = { 145 | sepNavIntBoundsRect = "{{0, 0}, {1280, 830}}"; 146 | sepNavSelRange = "{362, 56}"; 147 | sepNavVisRange = "{0, 510}"; 148 | }; 149 | }; 150 | 1D3623250D0F684500981E51 /* PopupViewTestAppDelegate.m */ = { 151 | uiCtxt = { 152 | sepNavIntBoundsRect = "{{0, 0}, {1686, 1120}}"; 153 | sepNavSelRange = "{0, 0}"; 154 | sepNavVisRange = "{0, 2173}"; 155 | }; 156 | }; 157 | 1D6058900D05DD3D006BFB54 /* PopupViewTest */ = { 158 | activeExec = 0; 159 | executables = ( 160 | 1486DB261271690C00AC043E /* PopupViewTest */, 161 | ); 162 | }; 163 | 28D7ACF60DDB3853001CB0EB /* PopupViewTestViewController.h */ = { 164 | uiCtxt = { 165 | sepNavIntBoundsRect = "{{0, 0}, {1280, 830}}"; 166 | sepNavSelRange = "{314, 19}"; 167 | sepNavVisRange = "{0, 344}"; 168 | }; 169 | }; 170 | 28D7ACF70DDB3853001CB0EB /* PopupViewTestViewController.m */ = { 171 | uiCtxt = { 172 | sepNavIntBoundsRect = "{{0, 0}, {1280, 1036}}"; 173 | sepNavSelRange = "{144, 0}"; 174 | sepNavVisRange = "{58, 1547}"; 175 | }; 176 | }; 177 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 178 | activeBuildConfigurationName = Debug; 179 | activeExecutable = 1486DB261271690C00AC043E /* PopupViewTest */; 180 | activeSDKPreference = iphonesimulator4.2; 181 | activeTarget = 1D6058900D05DD3D006BFB54 /* PopupViewTest */; 182 | addToTargets = ( 183 | 1D6058900D05DD3D006BFB54 /* PopupViewTest */, 184 | ); 185 | breakpoints = ( 186 | ); 187 | codeSenseManager = 1486DB361271691800AC043E /* Code sense */; 188 | executables = ( 189 | 1486DB261271690C00AC043E /* PopupViewTest */, 190 | ); 191 | perUserDictionary = { 192 | PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { 193 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 194 | PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; 195 | PBXFileTableDataSourceColumnWidthsKey = ( 196 | 20, 197 | 1102, 198 | 20, 199 | 48, 200 | 43, 201 | 43, 202 | 20, 203 | ); 204 | PBXFileTableDataSourceColumnsKey = ( 205 | PBXFileDataSource_FiletypeID, 206 | PBXFileDataSource_Filename_ColumnID, 207 | PBXFileDataSource_Built_ColumnID, 208 | PBXFileDataSource_ObjectSize_ColumnID, 209 | PBXFileDataSource_Errors_ColumnID, 210 | PBXFileDataSource_Warnings_ColumnID, 211 | PBXFileDataSource_Target_ColumnID, 212 | ); 213 | }; 214 | PBXPerProjectTemplateStateSaveDate = 312709830; 215 | PBXWorkspaceStateSaveDate = 312709830; 216 | }; 217 | perUserProjectItems = { 218 | 140FF3B1127FACFB00F62662 /* PBXTextBookmark */ = 140FF3B1127FACFB00F62662 /* PBXTextBookmark */; 219 | 140FF3C6127FAE0400F62662 /* PBXTextBookmark */ = 140FF3C6127FAE0400F62662 /* PBXTextBookmark */; 220 | 144633E91283EF71005F8988 /* PBXTextBookmark */ = 144633E91283EF71005F8988 /* PBXTextBookmark */; 221 | 144633EA1283EF71005F8988 /* PBXTextBookmark */ = 144633EA1283EF71005F8988 /* PBXTextBookmark */; 222 | 144633F61283EFED005F8988 /* PBXTextBookmark */ = 144633F61283EFED005F8988 /* PBXTextBookmark */; 223 | 14A55A9F12A392C2000BF4B6 /* PBXTextBookmark */ = 14A55A9F12A392C2000BF4B6 /* PBXTextBookmark */; 224 | 14A55AB412A39316000BF4B6 /* PBXTextBookmark */ = 14A55AB412A39316000BF4B6 /* PBXTextBookmark */; 225 | 14AFEE1C127F1D6000001F68 /* PBXTextBookmark */ = 14AFEE1C127F1D6000001F68 /* PBXTextBookmark */; 226 | }; 227 | sourceControlManager = 1486DB351271691800AC043E /* Source Control */; 228 | userBuildSettings = { 229 | }; 230 | }; 231 | 32CA4F630368D1EE00C91783 /* PopupViewTest_Prefix.pch */ = { 232 | uiCtxt = { 233 | sepNavIntBoundsRect = "{{0, 0}, {1280, 805}}"; 234 | sepNavSelRange = "{1468, 0}"; 235 | sepNavVisRange = "{0, 1468}"; 236 | }; 237 | }; 238 | } 239 | -------------------------------------------------------------------------------- /PopupViewTest.xcodeproj/xcuserdata/sonson.xcuserdatad/xcschemes/PopupViewTest.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 14 | 20 | 21 | 22 | 23 | 24 | 29 | 30 | 31 | 32 | 40 | 41 | 47 | 48 | 49 | 50 | 51 | 52 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /PopupViewTest.xcodeproj/xcuserdata/sonson.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | PopupViewTest.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 1D6058900D05DD3D006BFB54 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /PopupViewTest/PopupViewTest-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIconFiles 14 | 15 | icon57x57.png 16 | icon114x114.png 17 | icon72x72.png 18 | 19 | CFBundleIdentifier 20 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 21 | CFBundleInfoDictionaryVersion 22 | 6.0 23 | CFBundleName 24 | ${PRODUCT_NAME} 25 | CFBundlePackageType 26 | APPL 27 | CFBundleSignature 28 | ???? 29 | CFBundleVersion 30 | 1.0 31 | LSRequiresIPhoneOS 32 | 33 | NSMainNibFile 34 | MainWindow 35 | NSMainNibFile~ipad 36 | MainWindow-iPad 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationLandscapeLeft 41 | UIInterfaceOrientationLandscapeRight 42 | 43 | CFBundleShortVersionString 44 | gdfgdfg 45 | 46 | 47 | -------------------------------------------------------------------------------- /PopupViewTest/PopupViewTestAppDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * PopupView 3 | * PopupViewTestAppDelegate.h 4 | * 5 | * Copyright (c) Yuichi YOSHIDA, 10/12/07. 6 | * All rights reserved. 7 | * 8 | * BSD License 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, are 11 | * permitted provided that the following conditions are met: 12 | * - Redistributions of source code must retain the above copyright notice, this list of 13 | * conditions and the following disclaimer. 14 | * - Redistributions in binary form must reproduce the above copyright notice, this list 15 | * of conditions and the following disclaimer in the documentation and/or other materia 16 | * ls provided with the distribution. 17 | * - Neither the name of the "Yuichi Yoshida" nor the names of its contributors may be u 18 | * sed to endorse or promote products derived from this software without specific prior 19 | * written permission. 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY E 21 | * XPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES O 22 | * F MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SH 23 | * ALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENT 24 | * AL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROC 25 | * UREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS I 26 | * NTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI 27 | * CT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF T 28 | * HE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #import 32 | 33 | @class PopupViewTestViewController; 34 | 35 | @interface PopupViewTestAppDelegate : NSObject { 36 | UIWindow *window; 37 | UINavigationController *viewController; 38 | } 39 | 40 | @property (nonatomic, retain) IBOutlet UIWindow *window; 41 | @property (nonatomic, retain) IBOutlet UINavigationController *viewController; 42 | 43 | @end 44 | 45 | -------------------------------------------------------------------------------- /PopupViewTest/PopupViewTestAppDelegate.m: -------------------------------------------------------------------------------- 1 | /* 2 | * PopupView 3 | * PopupViewTestAppDelegate.m 4 | * 5 | * Copyright (c) Yuichi YOSHIDA, 10/12/07. 6 | * All rights reserved. 7 | * 8 | * BSD License 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, are 11 | * permitted provided that the following conditions are met: 12 | * - Redistributions of source code must retain the above copyright notice, this list of 13 | * conditions and the following disclaimer. 14 | * - Redistributions in binary form must reproduce the above copyright notice, this list 15 | * of conditions and the following disclaimer in the documentation and/or other materia 16 | * ls provided with the distribution. 17 | * - Neither the name of the "Yuichi Yoshida" nor the names of its contributors may be u 18 | * sed to endorse or promote products derived from this software without specific prior 19 | * written permission. 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY E 21 | * XPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES O 22 | * F MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SH 23 | * ALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENT 24 | * AL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROC 25 | * UREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS I 26 | * NTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI 27 | * CT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF T 28 | * HE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #import "PopupViewTestAppDelegate.h" 32 | #import "PopupViewTestViewController.h" 33 | 34 | @implementation PopupViewTestAppDelegate 35 | 36 | @synthesize window; 37 | @synthesize viewController; 38 | 39 | 40 | #pragma mark - 41 | #pragma mark Application lifecycle 42 | 43 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 44 | 45 | // Override point for customization after application launch. 46 | 47 | self.window.rootViewController = viewController; 48 | // Add the view controller's view to the window and display. 49 | //[window addSubview:viewController.view]; 50 | [window makeKeyAndVisible]; 51 | 52 | return YES; 53 | } 54 | 55 | 56 | - (void)applicationWillResignActive:(UIApplication *)application { 57 | /* 58 | 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. 59 | 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. 60 | */ 61 | } 62 | 63 | 64 | - (void)applicationDidEnterBackground:(UIApplication *)application { 65 | /* 66 | 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. 67 | If your application supports background execution, called instead of applicationWillTerminate: when the user quits. 68 | */ 69 | } 70 | 71 | 72 | - (void)applicationWillEnterForeground:(UIApplication *)application { 73 | /* 74 | Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. 75 | */ 76 | } 77 | 78 | 79 | - (void)applicationDidBecomeActive:(UIApplication *)application { 80 | /* 81 | 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. 82 | */ 83 | } 84 | 85 | 86 | - (void)applicationWillTerminate:(UIApplication *)application { 87 | /* 88 | Called when the application is about to terminate. 89 | See also applicationDidEnterBackground:. 90 | */ 91 | } 92 | 93 | 94 | #pragma mark - 95 | #pragma mark Memory management 96 | 97 | - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { 98 | /* 99 | Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. 100 | */ 101 | } 102 | 103 | @end 104 | -------------------------------------------------------------------------------- /PopupViewTest/PopupViewTestViewController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * PopupView 3 | * PopupViewTestViewController.m 4 | * 5 | * Copyright (c) Yuichi YOSHIDA, 10/12/07. 6 | * All rights reserved. 7 | * 8 | * BSD License 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, are 11 | * permitted provided that the following conditions are met: 12 | * - Redistributions of source code must retain the above copyright notice, this list of 13 | * conditions and the following disclaimer. 14 | * - Redistributions in binary form must reproduce the above copyright notice, this list 15 | * of conditions and the following disclaimer in the documentation and/or other materia 16 | * ls provided with the distribution. 17 | * - Neither the name of the "Yuichi Yoshida" nor the names of its contributors may be u 18 | * sed to endorse or promote products derived from this software without specific prior 19 | * written permission. 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY E 21 | * XPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES O 22 | * F MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SH 23 | * ALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENT 24 | * AL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROC 25 | * UREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS I 26 | * NTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI 27 | * CT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF T 28 | * HE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #import 32 | 33 | #import 34 | 35 | @interface PopupViewTestViewController : UIViewController { 36 | UZPopupView *popup; 37 | NSArray *messages; 38 | int currentMessageIndex; 39 | IBOutlet UIView *testContentView; 40 | 41 | IBOutlet UISwitch *animationSwitch; 42 | IBOutlet UISwitch *modalSwitch; 43 | } 44 | 45 | - (IBAction)pushButton:(id)sender; 46 | - (void)didDismissModal:(UZPopupView*)popupview; 47 | - (void)didTouchPopupView:(UZPopupView*)sender; 48 | @end 49 | 50 | -------------------------------------------------------------------------------- /PopupViewTest/PopupViewTestViewController.m: -------------------------------------------------------------------------------- 1 | /* 2 | * PopupView 3 | * PopupViewTestViewController.m 4 | * 5 | * Copyright (c) Yuichi YOSHIDA, 10/12/07. 6 | * All rights reserved. 7 | * 8 | * BSD License 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, are 11 | * permitted provided that the following conditions are met: 12 | * - Redistributions of source code must retain the above copyright notice, this list of 13 | * conditions and the following disclaimer. 14 | * - Redistributions in binary form must reproduce the above copyright notice, this list 15 | * of conditions and the following disclaimer in the documentation and/or other materia 16 | * ls provided with the distribution. 17 | * - Neither the name of the "Yuichi Yoshida" nor the names of its contributors may be u 18 | * sed to endorse or promote products derived from this software without specific prior 19 | * written permission. 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY E 21 | * XPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES O 22 | * F MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SH 23 | * ALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENT 24 | * AL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROC 25 | * UREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS I 26 | * NTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI 27 | * CT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF T 28 | * HE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #import "PopupViewTestViewController.h" 32 | 33 | @implementation PopupViewTestViewController 34 | 35 | - (IBAction)pushButton:(id)sender { 36 | DNSLogMethod 37 | 38 | if (popup == nil) { 39 | if (currentMessageIndex == 0) { 40 | popup = [[UZPopupView alloc] initWithContentView:testContentView contentSize:CGSizeMake(203, 63)]; 41 | currentMessageIndex++; 42 | } 43 | else if (currentMessageIndex == 1) { 44 | popup = [[UZPopupView alloc] initWithString:@"test message" withFontOfSize:29]; 45 | currentMessageIndex++; 46 | } 47 | else if (currentMessageIndex == 2) { 48 | popup = [[UZPopupView alloc] initWithImage:[UIImage imageNamed:@"2tchSmall.png"]]; 49 | currentMessageIndex = 0; 50 | } 51 | if (modalSwitch.on) 52 | [popup presentModalFromBarButtonItem:sender inView:self.view animated:animationSwitch.on]; 53 | else 54 | [popup showFromBarButtonItem:sender inView:self.view animated:animationSwitch.on]; 55 | [popup addTarget:self action:@selector(didTouchPopupView:)]; 56 | [popup setDelegate:self]; 57 | } 58 | else if (!modalSwitch.on) { 59 | [popup dismiss:animationSwitch.on]; 60 | popup = nil; 61 | } 62 | } 63 | 64 | - (void)didTouchPopupView:(UZPopupView*)sender { 65 | DNSLogMethod 66 | DNSLog(@"%@", sender); 67 | } 68 | 69 | - (void)didDismissModal:(UZPopupView*)popupview { 70 | DNSLogMethod 71 | if (popupview == popup) { 72 | popup = nil; 73 | } 74 | } 75 | 76 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 77 | UITouch *touch = [touches anyObject]; 78 | 79 | if (popup == nil) { 80 | if (currentMessageIndex == 0) { 81 | popup = [[UZPopupView alloc] initWithImage:[UIImage imageNamed:@"2tchSmall.png"]]; 82 | currentMessageIndex++; 83 | } 84 | else if (currentMessageIndex == 1) { 85 | popup = [[UZPopupView alloc] initWithString:@"test message" withFontOfSize:16]; 86 | currentMessageIndex++; 87 | } 88 | else if (currentMessageIndex == 2) { 89 | popup = [[UZPopupView alloc] initWithContentView:testContentView contentSize:CGSizeMake(203, 63)]; 90 | currentMessageIndex = 0; 91 | } 92 | if (modalSwitch.on) 93 | [popup presentModalAtPoint:[touch locationInView:self.view] inView:self.view animated:animationSwitch.on]; 94 | else 95 | [popup showAtPoint:[touch locationInView:self.view] inView:self.view animated:animationSwitch.on]; 96 | [popup addTarget:self action:@selector(didTouchPopupView:)]; 97 | [popup setDelegate:self]; 98 | } 99 | else if (!modalSwitch.on) { 100 | [popup dismiss:animationSwitch.on]; 101 | popup = nil; 102 | } 103 | } 104 | 105 | @end 106 | -------------------------------------------------------------------------------- /PopupViewTest/PopupViewTest_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'PopupViewTest' target in the 'PopupViewTest' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | 10 | //#if TARGET_IPHONE_SIMULATOR 11 | //#import 12 | //#else 13 | #import 14 | //#endif 15 | 16 | #ifdef _DEBUG 17 | #define DNSLog(...); NSLog(__VA_ARGS__); 18 | #define DNSLogMethod NSLog(@"[%s] %@", class_getName([self class]), NSStringFromSelector(_cmd)); 19 | #define DNSLogPoint(p) NSLog(@"%f,%f", p.x, p.y); 20 | #define DNSLogSize(p) NSLog(@"%f,%f", p.width, p.height); 21 | #define DNSLogRect(p) NSLog(@"%f,%f %f,%f", p.origin.x, p.origin.y, p.size.width, p.size.height); 22 | 23 | //CFAbsoluteTime startTime; 24 | //#define D_START startTime=CFAbsoluteTimeGetCurrent(); 25 | //#define D_END DNSLog(@"[%s] %@ %f seconds", class_getName([self class]), NSStringFromSelector(_cmd), CFAbsoluteTimeGetCurrent() - startTime ); 26 | //#else 27 | //#define DNSLog(...); // NSLog(__VA_ARGS__); 28 | //#define DNSLogMethod // NSLog(@"[%s] %@", class_getName([self class]), NSStringFromSelector(_cmd) ); 29 | //#define DNSLogPoint(p) // NSLog(@"%f,%f", p.x, p.y); 30 | //#define DNSLogSize(p) // NSLog(@"%f,%f", p.width, p.height); 31 | //#define DNSLogRect(p) // NSLog(@"%f,%f %f,%f", p.origin.x, p.origin.y, p.size.width, p.size.height); 32 | 33 | #define D_START // CFAbsoluteTime startTime=CFAbsoluteTimeGetCurrent(); 34 | #define D_END // DNSLog(@"New %f seconds", CFAbsoluteTimeGetCurrent() - startTime ); 35 | #endif 36 | 37 | #define SAFE_FREE(p) { if(p) { free(p); (p)=NULL; } } 38 | -------------------------------------------------------------------------------- /PopupViewTest/Resources/2tchSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/PopupView/24c66f3faf3f6c4f10eea70b54f3e1fa37d2f8f6/PopupViewTest/Resources/2tchSmall.png -------------------------------------------------------------------------------- /PopupViewTest/Resources/MainWindow.xib: -------------------------------------------------------------------------------- 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 | 56 | 57 | 58 | 59 | 60 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /PopupViewTest/Resources/PopupViewTestViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /PopupViewTest/Resources/iPad/MainWindow-iPad.xib: -------------------------------------------------------------------------------- 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 | 58 | 59 | 60 | 61 | 62 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /PopupViewTest/Resources/image/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/PopupView/24c66f3faf3f6c4f10eea70b54f3e1fa37d2f8f6/PopupViewTest/Resources/image/Default.png -------------------------------------------------------------------------------- /PopupViewTest/Resources/image/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/PopupView/24c66f3faf3f6c4f10eea70b54f3e1fa37d2f8f6/PopupViewTest/Resources/image/Default@2x.png -------------------------------------------------------------------------------- /PopupViewTest/Resources/image/icon114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/PopupView/24c66f3faf3f6c4f10eea70b54f3e1fa37d2f8f6/PopupViewTest/Resources/image/icon114x114.png -------------------------------------------------------------------------------- /PopupViewTest/Resources/image/icon57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/PopupView/24c66f3faf3f6c4f10eea70b54f3e1fa37d2f8f6/PopupViewTest/Resources/image/icon57x57.png -------------------------------------------------------------------------------- /PopupViewTest/Resources/image/icon72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/PopupView/24c66f3faf3f6c4f10eea70b54f3e1fa37d2f8f6/PopupViewTest/Resources/image/icon72x72.png -------------------------------------------------------------------------------- /PopupViewTest/main.m: -------------------------------------------------------------------------------- 1 | /* 2 | * PopupView 3 | * main.m 4 | * 5 | * Copyright (c) Yuichi YOSHIDA, 10/12/07. 6 | * All rights reserved. 7 | * 8 | * BSD License 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, are 11 | * permitted provided that the following conditions are met: 12 | * - Redistributions of source code must retain the above copyright notice, this list of 13 | * conditions and the following disclaimer. 14 | * - Redistributions in binary form must reproduce the above copyright notice, this list 15 | * of conditions and the following disclaimer in the documentation and/or other materia 16 | * ls provided with the distribution. 17 | * - Neither the name of the "Yuichi Yoshida" nor the names of its contributors may be u 18 | * sed to endorse or promote products derived from this software without specific prior 19 | * written permission. 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY E 21 | * XPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES O 22 | * F MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SH 23 | * ALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENT 24 | * AL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROC 25 | * UREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS I 26 | * NTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI 27 | * CT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF T 28 | * HE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | #import 31 | #import "PopupViewTestAppDelegate.h" 32 | 33 | int main(int argc, char *argv[]) { 34 | @autoreleasepool { 35 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([PopupViewTestAppDelegate class])); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | PopupView ======= 2 | 3 | License ======= BSD License. 4 | 5 | Supplementary document ======= 6 | For implementation, PDF file is [here](https://raw.githubusercontent.com/sonsongithub/PopupView/master/sd201206.pdf). (First appearance, 技術評論社刊 Software Design 2011年6月号) SNPopupView Reference ======= - (id)initWithString:(NSString*)newValue; ###Parameters ####newValue Thre string to display as title in the popup. ###Return value An initialized popup. ###Discussion This method uses default title's font size. If you want to set own font size for title, you should use initWithString:withFontOfSize:. - (id)initWithString:(NSString*)newValue withFontOfSize:(float)newFontSize; ###Parameters ####newValue Thre string to display as title in the popup. ####newFontSize The point size of the font for title. ###Return value An initialized popup. ###Discussion This method does not automatically adjust font size of title. Therefore, the title string can go over popup view if you specfy too big font size. - (id)initWithImage:(UIImage*)newImage; ###Parameters ####newImage The image to display in the popup. ###Return value An initialized popup. ###Discussion None. - (id)initWithContentView:(UIView*)newContentView contentSize:(CGSize)contentSize; ###Parameters ####newContentView The new view whose content should be displayed by popup. ####contentSize The new size to apply to the content view. ###Return value An initialized popup. ###Discussion None. - (void)showAtPoint:(CGPoint)p inView:(UIView*)inView; ###Parameters ####p The position to display popup withing the coordinate system of popup's superview, that is inView. Popup anchors at this point. ####inView The view to set as popup' superview. ###Discussion None. - (void)showAtPoint:(CGPoint)p inView:(UIView*)inView animated:(BOOL)animated; ###Parameters ####p The position to display popup withing the coordinate system of popup's superview, that is inView. Popup anchors at this point. ####inView The view to contain popup. ####animated Specify YES to show it with animation, NO to show it immediately. ###Discussion None. - (void)dismiss; ###Discussion Dismiss popup with animation. - (void)dismiss:(BOOL)animtaed; ###Parameters ####animated Specify YES to dimiss it with animation, NO to dimiss it immediately. ###Discussion None. - (void)addTarget:(id)target action:(SEL)action; ###Prameters ####target The target object-that is, the object to which the action message is sent. If this is nil, the responder chain is searched for an object willing to respond to the action message. ####action A selector identifying an action message. It cannot be NULL. ###Discussion SNPopupView Reference - Using Private Method Addition. ======= - (void)showFromBarButtonItem:(UIBarButtonItem*)barButtonItem inView:(UIView*)inView; ###Parameters ####barButtonItem The bar button item on which to anchor the popup. ####inView The view to contain popup. ###Discussion This method uses a private method of UIBarButtonItem. Take care when submit your applicaiton that uses this method. - (void)showFromBarButtonItem:(UIBarButtonItem*)barButtonItem inView:(UIView*)inView animated:(BOOL)animated; ###Parameters ####barButtonItem The bar button item on which to anchor the popup. ####inView The view to contain popup. ####animated Specify YES to show it with animation, NO to show it immediately. ###Discussion This method uses a private method of UIBarButtonItem. Take care when submit your applicaiton that uses this method. Properties ====== ###title The receiver's title string value. @property(nonatomic, readonly) NSString *title; ###Discussion None. ###image The receiver's image value. @property(nonatomic, readonly) UIImage *image; ###Discussion None. ###contentView The receiver's content view. @property(nonatomic, readonly) UIView *contentView; ###Discussion Blog ======= * [sonson.jp][] Sorry, Japanese only.... Dependency ======= * none [sonson.jp]: http://sonson.jp -------------------------------------------------------------------------------- /UZPopupView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3A0DCD9A23E26998002FDF2D /* UZPopupView.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A0DCD9823E26998002FDF2D /* UZPopupView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 3A0DCDA123E26A54002FDF2D /* UZPopupView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A0DCDA023E26A54002FDF2D /* UZPopupView.m */; }; 12 | /* End PBXBuildFile section */ 13 | 14 | /* Begin PBXFileReference section */ 15 | 3A0DCD9523E26998002FDF2D /* UZPopupView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = UZPopupView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 16 | 3A0DCD9823E26998002FDF2D /* UZPopupView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UZPopupView.h; sourceTree = ""; }; 17 | 3A0DCD9923E26998002FDF2D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 18 | 3A0DCDA023E26A54002FDF2D /* UZPopupView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UZPopupView.m; sourceTree = ""; }; 19 | /* End PBXFileReference section */ 20 | 21 | /* Begin PBXFrameworksBuildPhase section */ 22 | 3A0DCD9223E26998002FDF2D /* Frameworks */ = { 23 | isa = PBXFrameworksBuildPhase; 24 | buildActionMask = 2147483647; 25 | files = ( 26 | ); 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXFrameworksBuildPhase section */ 30 | 31 | /* Begin PBXGroup section */ 32 | 3A0DCD8B23E26998002FDF2D = { 33 | isa = PBXGroup; 34 | children = ( 35 | 3A0DCD9723E26998002FDF2D /* UZPopupView */, 36 | 3A0DCD9623E26998002FDF2D /* Products */, 37 | ); 38 | sourceTree = ""; 39 | }; 40 | 3A0DCD9623E26998002FDF2D /* Products */ = { 41 | isa = PBXGroup; 42 | children = ( 43 | 3A0DCD9523E26998002FDF2D /* UZPopupView.framework */, 44 | ); 45 | name = Products; 46 | sourceTree = ""; 47 | }; 48 | 3A0DCD9723E26998002FDF2D /* UZPopupView */ = { 49 | isa = PBXGroup; 50 | children = ( 51 | 3A0DCD9823E26998002FDF2D /* UZPopupView.h */, 52 | 3A0DCDA023E26A54002FDF2D /* UZPopupView.m */, 53 | 3A0DCD9923E26998002FDF2D /* Info.plist */, 54 | ); 55 | path = UZPopupView; 56 | sourceTree = ""; 57 | }; 58 | /* End PBXGroup section */ 59 | 60 | /* Begin PBXHeadersBuildPhase section */ 61 | 3A0DCD9023E26998002FDF2D /* Headers */ = { 62 | isa = PBXHeadersBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | 3A0DCD9A23E26998002FDF2D /* UZPopupView.h in Headers */, 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | /* End PBXHeadersBuildPhase section */ 70 | 71 | /* Begin PBXNativeTarget section */ 72 | 3A0DCD9423E26998002FDF2D /* UZPopupView */ = { 73 | isa = PBXNativeTarget; 74 | buildConfigurationList = 3A0DCD9D23E26998002FDF2D /* Build configuration list for PBXNativeTarget "UZPopupView" */; 75 | buildPhases = ( 76 | 3A0DCD9023E26998002FDF2D /* Headers */, 77 | 3A0DCD9123E26998002FDF2D /* Sources */, 78 | 3A0DCD9223E26998002FDF2D /* Frameworks */, 79 | 3A0DCD9323E26998002FDF2D /* Resources */, 80 | ); 81 | buildRules = ( 82 | ); 83 | dependencies = ( 84 | ); 85 | name = UZPopupView; 86 | productName = UZPopupView; 87 | productReference = 3A0DCD9523E26998002FDF2D /* UZPopupView.framework */; 88 | productType = "com.apple.product-type.framework"; 89 | }; 90 | /* End PBXNativeTarget section */ 91 | 92 | /* Begin PBXProject section */ 93 | 3A0DCD8C23E26998002FDF2D /* Project object */ = { 94 | isa = PBXProject; 95 | attributes = { 96 | LastUpgradeCheck = 1110; 97 | ORGANIZATIONNAME = onesecure; 98 | TargetAttributes = { 99 | 3A0DCD9423E26998002FDF2D = { 100 | CreatedOnToolsVersion = 11.1; 101 | }; 102 | }; 103 | }; 104 | buildConfigurationList = 3A0DCD8F23E26998002FDF2D /* Build configuration list for PBXProject "UZPopupView" */; 105 | compatibilityVersion = "Xcode 9.3"; 106 | developmentRegion = en; 107 | hasScannedForEncodings = 0; 108 | knownRegions = ( 109 | en, 110 | Base, 111 | ); 112 | mainGroup = 3A0DCD8B23E26998002FDF2D; 113 | productRefGroup = 3A0DCD9623E26998002FDF2D /* Products */; 114 | projectDirPath = ""; 115 | projectRoot = ""; 116 | targets = ( 117 | 3A0DCD9423E26998002FDF2D /* UZPopupView */, 118 | ); 119 | }; 120 | /* End PBXProject section */ 121 | 122 | /* Begin PBXResourcesBuildPhase section */ 123 | 3A0DCD9323E26998002FDF2D /* Resources */ = { 124 | isa = PBXResourcesBuildPhase; 125 | buildActionMask = 2147483647; 126 | files = ( 127 | ); 128 | runOnlyForDeploymentPostprocessing = 0; 129 | }; 130 | /* End PBXResourcesBuildPhase section */ 131 | 132 | /* Begin PBXSourcesBuildPhase section */ 133 | 3A0DCD9123E26998002FDF2D /* Sources */ = { 134 | isa = PBXSourcesBuildPhase; 135 | buildActionMask = 2147483647; 136 | files = ( 137 | 3A0DCDA123E26A54002FDF2D /* UZPopupView.m in Sources */, 138 | ); 139 | runOnlyForDeploymentPostprocessing = 0; 140 | }; 141 | /* End PBXSourcesBuildPhase section */ 142 | 143 | /* Begin XCBuildConfiguration section */ 144 | 3A0DCD9B23E26998002FDF2D /* Debug */ = { 145 | isa = XCBuildConfiguration; 146 | buildSettings = { 147 | ALWAYS_SEARCH_USER_PATHS = NO; 148 | CLANG_ANALYZER_NONNULL = YES; 149 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 150 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 151 | CLANG_CXX_LIBRARY = "libc++"; 152 | CLANG_ENABLE_MODULES = YES; 153 | CLANG_ENABLE_OBJC_ARC = YES; 154 | CLANG_ENABLE_OBJC_WEAK = YES; 155 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 156 | CLANG_WARN_BOOL_CONVERSION = YES; 157 | CLANG_WARN_COMMA = YES; 158 | CLANG_WARN_CONSTANT_CONVERSION = YES; 159 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 160 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 161 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 162 | CLANG_WARN_EMPTY_BODY = YES; 163 | CLANG_WARN_ENUM_CONVERSION = YES; 164 | CLANG_WARN_INFINITE_RECURSION = YES; 165 | CLANG_WARN_INT_CONVERSION = YES; 166 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 167 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 168 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 169 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 170 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 171 | CLANG_WARN_STRICT_PROTOTYPES = YES; 172 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 173 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 174 | CLANG_WARN_UNREACHABLE_CODE = YES; 175 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 176 | COPY_PHASE_STRIP = NO; 177 | CURRENT_PROJECT_VERSION = 1; 178 | DEBUG_INFORMATION_FORMAT = dwarf; 179 | ENABLE_STRICT_OBJC_MSGSEND = YES; 180 | ENABLE_TESTABILITY = YES; 181 | GCC_C_LANGUAGE_STANDARD = gnu11; 182 | GCC_DYNAMIC_NO_PIC = NO; 183 | GCC_NO_COMMON_BLOCKS = YES; 184 | GCC_OPTIMIZATION_LEVEL = 0; 185 | GCC_PREPROCESSOR_DEFINITIONS = ( 186 | "DEBUG=1", 187 | "$(inherited)", 188 | ); 189 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 190 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 191 | GCC_WARN_UNDECLARED_SELECTOR = YES; 192 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 193 | GCC_WARN_UNUSED_FUNCTION = YES; 194 | GCC_WARN_UNUSED_VARIABLE = YES; 195 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 196 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 197 | MTL_FAST_MATH = YES; 198 | ONLY_ACTIVE_ARCH = YES; 199 | SDKROOT = iphoneos; 200 | VERSIONING_SYSTEM = "apple-generic"; 201 | VERSION_INFO_PREFIX = ""; 202 | }; 203 | name = Debug; 204 | }; 205 | 3A0DCD9C23E26998002FDF2D /* Release */ = { 206 | isa = XCBuildConfiguration; 207 | buildSettings = { 208 | ALWAYS_SEARCH_USER_PATHS = NO; 209 | CLANG_ANALYZER_NONNULL = YES; 210 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 211 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 212 | CLANG_CXX_LIBRARY = "libc++"; 213 | CLANG_ENABLE_MODULES = YES; 214 | CLANG_ENABLE_OBJC_ARC = YES; 215 | CLANG_ENABLE_OBJC_WEAK = YES; 216 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 217 | CLANG_WARN_BOOL_CONVERSION = YES; 218 | CLANG_WARN_COMMA = YES; 219 | CLANG_WARN_CONSTANT_CONVERSION = YES; 220 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 221 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 222 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 223 | CLANG_WARN_EMPTY_BODY = YES; 224 | CLANG_WARN_ENUM_CONVERSION = YES; 225 | CLANG_WARN_INFINITE_RECURSION = YES; 226 | CLANG_WARN_INT_CONVERSION = YES; 227 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 228 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 229 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 230 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 231 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 232 | CLANG_WARN_STRICT_PROTOTYPES = YES; 233 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 234 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 235 | CLANG_WARN_UNREACHABLE_CODE = YES; 236 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 237 | COPY_PHASE_STRIP = NO; 238 | CURRENT_PROJECT_VERSION = 1; 239 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 240 | ENABLE_NS_ASSERTIONS = NO; 241 | ENABLE_STRICT_OBJC_MSGSEND = YES; 242 | GCC_C_LANGUAGE_STANDARD = gnu11; 243 | GCC_NO_COMMON_BLOCKS = YES; 244 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 245 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 246 | GCC_WARN_UNDECLARED_SELECTOR = YES; 247 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 248 | GCC_WARN_UNUSED_FUNCTION = YES; 249 | GCC_WARN_UNUSED_VARIABLE = YES; 250 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 251 | MTL_ENABLE_DEBUG_INFO = NO; 252 | MTL_FAST_MATH = YES; 253 | SDKROOT = iphoneos; 254 | VALIDATE_PRODUCT = YES; 255 | VERSIONING_SYSTEM = "apple-generic"; 256 | VERSION_INFO_PREFIX = ""; 257 | }; 258 | name = Release; 259 | }; 260 | 3A0DCD9E23E26998002FDF2D /* Debug */ = { 261 | isa = XCBuildConfiguration; 262 | buildSettings = { 263 | CODE_SIGN_STYLE = Automatic; 264 | DEFINES_MODULE = YES; 265 | DYLIB_COMPATIBILITY_VERSION = 1; 266 | DYLIB_CURRENT_VERSION = 1; 267 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 268 | INFOPLIST_FILE = UZPopupView/Info.plist; 269 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 270 | LD_RUNPATH_SEARCH_PATHS = ( 271 | "$(inherited)", 272 | "@executable_path/Frameworks", 273 | "@loader_path/Frameworks", 274 | ); 275 | PRODUCT_BUNDLE_IDENTIFIER = com.onesecure.UZPopupView; 276 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 277 | SKIP_INSTALL = YES; 278 | TARGETED_DEVICE_FAMILY = "1,2"; 279 | }; 280 | name = Debug; 281 | }; 282 | 3A0DCD9F23E26998002FDF2D /* Release */ = { 283 | isa = XCBuildConfiguration; 284 | buildSettings = { 285 | CODE_SIGN_STYLE = Automatic; 286 | DEFINES_MODULE = YES; 287 | DYLIB_COMPATIBILITY_VERSION = 1; 288 | DYLIB_CURRENT_VERSION = 1; 289 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 290 | INFOPLIST_FILE = UZPopupView/Info.plist; 291 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 292 | LD_RUNPATH_SEARCH_PATHS = ( 293 | "$(inherited)", 294 | "@executable_path/Frameworks", 295 | "@loader_path/Frameworks", 296 | ); 297 | PRODUCT_BUNDLE_IDENTIFIER = com.onesecure.UZPopupView; 298 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 299 | SKIP_INSTALL = YES; 300 | TARGETED_DEVICE_FAMILY = "1,2"; 301 | }; 302 | name = Release; 303 | }; 304 | /* End XCBuildConfiguration section */ 305 | 306 | /* Begin XCConfigurationList section */ 307 | 3A0DCD8F23E26998002FDF2D /* Build configuration list for PBXProject "UZPopupView" */ = { 308 | isa = XCConfigurationList; 309 | buildConfigurations = ( 310 | 3A0DCD9B23E26998002FDF2D /* Debug */, 311 | 3A0DCD9C23E26998002FDF2D /* Release */, 312 | ); 313 | defaultConfigurationIsVisible = 0; 314 | defaultConfigurationName = Release; 315 | }; 316 | 3A0DCD9D23E26998002FDF2D /* Build configuration list for PBXNativeTarget "UZPopupView" */ = { 317 | isa = XCConfigurationList; 318 | buildConfigurations = ( 319 | 3A0DCD9E23E26998002FDF2D /* Debug */, 320 | 3A0DCD9F23E26998002FDF2D /* Release */, 321 | ); 322 | defaultConfigurationIsVisible = 0; 323 | defaultConfigurationName = Release; 324 | }; 325 | /* End XCConfigurationList section */ 326 | }; 327 | rootObject = 3A0DCD8C23E26998002FDF2D /* Project object */; 328 | } 329 | -------------------------------------------------------------------------------- /UZPopupView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /UZPopupView/UZPopupView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * PopupView 3 | * UZPopupView.h 4 | * 5 | * Copyright (c) Yuichi YOSHIDA, 10/12/07. 6 | * All rights reserved. 7 | * 8 | * BSD License 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, are 11 | * permitted provided that the following conditions are met: 12 | * - Redistributions of source code must retain the above copyright notice, this list of 13 | * conditions and the following disclaimer. 14 | * - Redistributions in binary form must reproduce the above copyright notice, this list 15 | * of conditions and the following disclaimer in the documentation and/or other materia 16 | * ls provided with the distribution. 17 | * - Neither the name of the "Yuichi Yoshida" nor the names of its contributors may be u 18 | * sed to endorse or promote products derived from this software without specific prior 19 | * written permission. 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY E 21 | * XPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES O 22 | * F MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SH 23 | * ALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENT 24 | * AL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROC 25 | * UREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS I 26 | * NTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI 27 | * CT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF T 28 | * HE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #import 32 | 33 | //#define _CONFIRM_REGION 34 | 35 | #define SHADOW_OFFSET CGSizeMake(10, 10) 36 | #define CONTENT_OFFSET CGSizeMake(10, 10) 37 | #define POPUP_ROOT_SIZE CGSizeMake(20, 10) 38 | 39 | #define HORIZONTAL_SAFE_MARGIN 30 40 | 41 | #define POPUP_ANIMATION_DURATION 0.3 42 | #define DISMISS_ANIMATION_DURATION 0.2 43 | 44 | #define DEFAULT_TITLE_SIZE 20 45 | 46 | #define ALPHA 0.6 47 | 48 | #define BAR_BUTTON_ITEM_UPPER_MARGIN 10 49 | #define BAR_BUTTON_ITEM_BOTTOM_MARGIN 5 50 | 51 | @class TouchPeekView; 52 | 53 | typedef enum { 54 | UZPopupViewUp = 1, 55 | UZPopupViewDown = 2, 56 | UZPopupViewRight = 1 << 8, 57 | UZPopupViewLeft = 2 << 8, 58 | } UZPopupViewDirection; 59 | 60 | @class UZPopupView; 61 | 62 | @protocol UZPopupViewModalDelegate 63 | - (void)didDismissModal:(UZPopupView*)popupview; 64 | @end 65 | 66 | 67 | @interface UZPopupView : UIView 68 | @property (nonatomic, readonly) NSString *title; 69 | @property (nonatomic, readonly) UIImage *image; 70 | @property (nonatomic, readonly) UIView *contentView; 71 | @property (nonatomic, weak) id delegate; 72 | 73 | - (instancetype) initWithString:(NSString*)newValue withFontOfSize:(float)newFontSize; 74 | - (instancetype) initWithString:(NSString*)newValue; 75 | - (instancetype) initWithImage:(UIImage*)newImage; 76 | - (instancetype) initWithContentView:(UIView*)newContentView contentSize:(CGSize)contentSize; 77 | 78 | - (void) showAtPoint:(CGPoint)p inView:(UIView*)inView; 79 | - (void) showAtPoint:(CGPoint)p inView:(UIView*)inView animated:(BOOL)animated; 80 | 81 | - (void) presentModalAtPoint:(CGPoint)p inView:(UIView*)inView; 82 | - (void) presentModalAtPoint:(CGPoint)p inView:(UIView*)inView animated:(BOOL)animated; 83 | 84 | - (BOOL) shouldBeDismissedFor:(NSSet *)touches withEvent:(UIEvent *)event; 85 | - (void) dismiss; 86 | - (void) dismiss:(BOOL)animtaed; 87 | - (void) dismissModal; 88 | 89 | - (void) addTarget:(id)target action:(SEL)action; 90 | @end 91 | 92 | 93 | @interface UZPopupView(UsingPrivateMethod) 94 | 95 | - (void) showFromBarButtonItem:(UIBarButtonItem*)barButtonItem inView:(UIView*)inView; 96 | - (void) showFromBarButtonItem:(UIBarButtonItem*)barButtonItem inView:(UIView*)inView animated:(BOOL)animated; 97 | 98 | - (void) presentModalFromBarButtonItem:(UIBarButtonItem*)barButtonItem inView:(UIView*)inView; 99 | - (void) presentModalFromBarButtonItem:(UIBarButtonItem*)barButtonItem inView:(UIView*)inView animated:(BOOL)animated; 100 | 101 | @end 102 | -------------------------------------------------------------------------------- /UZPopupView/UZPopupView.m: -------------------------------------------------------------------------------- 1 | /* 2 | * PopupView 3 | * UZPopupView.m 4 | * 5 | * Copyright (c) Yuichi YOSHIDA, 10/12/07. 6 | * All rights reserved. 7 | * 8 | * BSD License 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, are 11 | * permitted provided that the following conditions are met: 12 | * - Redistributions of source code must retain the above copyright notice, this list of 13 | * conditions and the following disclaimer. 14 | * - Redistributions in binary form must reproduce the above copyright notice, this list 15 | * of conditions and the following disclaimer in the documentation and/or other materia 16 | * ls provided with the distribution. 17 | * - Neither the name of the "Yuichi Yoshida" nor the names of its contributors may be u 18 | * sed to endorse or promote products derived from this software without specific prior 19 | * written permission. 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY E 21 | * XPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES O 22 | * F MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SH 23 | * ALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENT 24 | * AL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROC 25 | * UREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS I 26 | * NTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI 27 | * CT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF T 28 | * HE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #import "UZPopupView.h" 32 | #import 33 | 34 | #import 35 | 36 | #define DNSLogMethod() do { NSLog(@"[%s] %@", class_getName([self class]), NSStringFromSelector(_cmd)); } while(0) 37 | 38 | 39 | @interface TouchPeekView : UIView { 40 | } 41 | @property (nonatomic, weak) UZPopupView *delegate; 42 | @end 43 | 44 | @implementation TouchPeekView 45 | 46 | - (id)initWithFrame:(CGRect)frame { 47 | self = [super initWithFrame:frame]; 48 | if (self) { 49 | [self setBackgroundColor:[UIColor clearColor]]; 50 | } 51 | return self; 52 | } 53 | 54 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 55 | DNSLogMethod(); 56 | if ([_delegate shouldBeDismissedFor:touches withEvent:event]) { 57 | [_delegate dismissModal]; 58 | } 59 | } 60 | 61 | @end 62 | 63 | @interface UZPopupView () 64 | @end 65 | 66 | @implementation UZPopupView { 67 | CGGradientRef gradient; 68 | CGGradientRef gradient2; 69 | 70 | CGRect contentRect; 71 | CGRect contentBounds; 72 | 73 | CGRect popupRect; 74 | CGRect popupBounds; 75 | 76 | CGRect viewRect; 77 | CGRect viewBounds; 78 | 79 | CGPoint pointToBeShown; 80 | 81 | float fontSize; 82 | 83 | float horizontalOffset; 84 | UZPopupViewDirection direction; 85 | id target; 86 | SEL action; 87 | 88 | TouchPeekView *peekView; 89 | 90 | BOOL animatedWhenAppering; 91 | } 92 | 93 | #pragma mark - Prepare 94 | 95 | - (void)setupGradientColors { 96 | CGColorSpaceRef rgb = CGColorSpaceCreateDeviceRGB(); 97 | CGFloat colors[] = 98 | { 99 | 155.0 / 255.0, 155.0 / 255.0, 155.0 / 255.0, ALPHA, 100 | 70.0 / 255.0, 70.0 / 255.0, 70.0 / 255.0, ALPHA, 101 | }; 102 | gradient = CGGradientCreateWithColorComponents(rgb, colors, NULL, sizeof(colors)/(sizeof(colors[0])*4)); 103 | 104 | CGFloat colors2[] = 105 | { 106 | 20.0 / 255.0, 20.0 / 255.0, 20.0 / 255.0, ALPHA, 107 | 0.0 / 255.0, 0.0 / 255.0, 0.0 / 255.0, ALPHA, 108 | }; 109 | gradient2 = CGGradientCreateWithColorComponents(rgb, colors2, NULL, sizeof(colors2)/(sizeof(colors2[0])*4)); 110 | CGColorSpaceRelease(rgb); 111 | } 112 | 113 | - (instancetype) initWithString:(NSString*)newValue { 114 | return [self initWithString:newValue withFontOfSize:DEFAULT_TITLE_SIZE]; 115 | } 116 | 117 | - (instancetype) initWithString:(NSString*)newValue withFontOfSize:(float)newFontSize { 118 | self = [super init]; 119 | if (self != nil) { 120 | _title = [newValue copy]; 121 | 122 | // Initialization code 123 | [self setBackgroundColor:[UIColor clearColor]]; 124 | 125 | fontSize = newFontSize; 126 | UIFont *font = [UIFont boldSystemFontOfSize:fontSize]; 127 | 128 | CGSize titleRenderingSize = [_title sizeWithAttributes:@{NSFontAttributeName: font}]; 129 | 130 | contentBounds = CGRectMake(0, 0, 0, 0); 131 | contentBounds.size = titleRenderingSize; 132 | 133 | [self setupGradientColors]; 134 | } 135 | return self; 136 | } 137 | 138 | - (instancetype) initWithImage:(UIImage*)newImage { 139 | self = [super init]; 140 | if (self != nil) { 141 | _image = newImage; 142 | 143 | // Initialization code 144 | [self setBackgroundColor:[UIColor clearColor]]; 145 | 146 | contentBounds = CGRectMake(0, 0, 0, 0); 147 | contentBounds.size = _image.size; 148 | 149 | [self setupGradientColors]; 150 | } 151 | return self; 152 | } 153 | 154 | - (instancetype) initWithContentView:(UIView*)newContentView contentSize:(CGSize)contentSize { 155 | self = [super init]; 156 | if (self != nil) { 157 | _contentView = newContentView; 158 | 159 | // Initialization code 160 | [self setBackgroundColor:[UIColor clearColor]]; 161 | 162 | contentBounds = CGRectMake(0, 0, 0, 0); 163 | contentBounds.size = contentSize; 164 | 165 | [self setupGradientColors]; 166 | } 167 | return self; 168 | } 169 | 170 | - (void)addTarget:(id)newTarget action:(SEL)newAction { 171 | if ([newTarget respondsToSelector:newAction]) { 172 | target = newTarget; 173 | action = newAction; 174 | } 175 | } 176 | 177 | #pragma mark - Present modal 178 | 179 | - (void)createAndAttachTouchPeekView { 180 | UIWindow *window = [[UIApplication sharedApplication] keyWindow]; 181 | 182 | [peekView removeFromSuperview]; 183 | peekView = nil; 184 | peekView = [[TouchPeekView alloc] initWithFrame:window.frame]; 185 | [peekView setDelegate:self]; 186 | 187 | [window addSubview:peekView]; 188 | } 189 | 190 | - (void)presentModalAtPoint:(CGPoint)p inView:(UIView*)inView { 191 | animatedWhenAppering = YES; 192 | [self createAndAttachTouchPeekView]; 193 | [self showAtPoint:[inView convertPoint:p toView:[[UIApplication sharedApplication] keyWindow]] inView:[[UIApplication sharedApplication] keyWindow]]; 194 | } 195 | 196 | - (void)presentModalAtPoint:(CGPoint)p inView:(UIView*)inView animated:(BOOL)animated { 197 | animatedWhenAppering = animated; 198 | [self createAndAttachTouchPeekView]; 199 | [self showAtPoint:[inView convertPoint:p toView:[[UIApplication sharedApplication] keyWindow]] inView:[[UIApplication sharedApplication] keyWindow] animated:animated]; 200 | } 201 | 202 | #pragma mark - Show as normal view 203 | 204 | - (void)showAtPoint:(CGPoint)p inView:(UIView*)inView { 205 | [self showAtPoint:p inView:inView animated:NO]; 206 | } 207 | 208 | - (void)showAtPoint:(CGPoint)p inView:(UIView*)inView animated:(BOOL)animated { 209 | if ((p.y - contentBounds.size.height - POPUP_ROOT_SIZE.height - 2 * CONTENT_OFFSET.height - SHADOW_OFFSET.height) < 0) { 210 | direction = UZPopupViewDown; 211 | } 212 | else { 213 | direction = UZPopupViewUp; 214 | } 215 | 216 | if (direction & UZPopupViewUp) { 217 | 218 | pointToBeShown = p; 219 | 220 | // calc content area 221 | contentRect.origin.x = p.x - (int)contentBounds.size.width/2; 222 | contentRect.origin.y = p.y - CONTENT_OFFSET.height - POPUP_ROOT_SIZE.height - contentBounds.size.height; 223 | contentRect.size = contentBounds.size; 224 | 225 | // calc popup area 226 | popupBounds.origin = CGPointMake(0, 0); 227 | popupBounds.size.width = contentBounds.size.width + CONTENT_OFFSET.width + CONTENT_OFFSET.width; 228 | popupBounds.size.height = contentBounds.size.height + CONTENT_OFFSET.height + CONTENT_OFFSET.height + POPUP_ROOT_SIZE.height; 229 | 230 | popupRect.origin.x = contentRect.origin.x - CONTENT_OFFSET.width; 231 | popupRect.origin.y = contentRect.origin.y - CONTENT_OFFSET.height; 232 | popupRect.size = popupBounds.size; 233 | 234 | // calc self size and rect 235 | viewBounds.origin = CGPointMake(0, 0); 236 | viewBounds.size.width = popupRect.size.width + SHADOW_OFFSET.width + SHADOW_OFFSET.width; 237 | viewBounds.size.height = popupRect.size.height + SHADOW_OFFSET.height + SHADOW_OFFSET.height; 238 | 239 | viewRect.origin.x = popupRect.origin.x - SHADOW_OFFSET.width; 240 | viewRect.origin.y = popupRect.origin.y - SHADOW_OFFSET.height; 241 | viewRect.size = viewBounds.size; 242 | 243 | float left_viewRect = viewRect.origin.x + viewRect.size.width; 244 | 245 | // calc horizontal offset 246 | if (viewRect.origin.x < 0) { 247 | direction = direction | UZPopupViewRight; 248 | horizontalOffset = viewRect.origin.x; 249 | 250 | if (viewRect.origin.x - horizontalOffset < pointToBeShown.x - HORIZONTAL_SAFE_MARGIN) { 251 | } 252 | else { 253 | pointToBeShown.x = HORIZONTAL_SAFE_MARGIN; 254 | } 255 | viewRect.origin.x -= horizontalOffset; 256 | contentRect.origin.x -= horizontalOffset; 257 | popupRect.origin.x -= horizontalOffset; 258 | } 259 | else if (left_viewRect > inView.frame.size.width) { 260 | direction = direction | UZPopupViewLeft; 261 | horizontalOffset = inView.frame.size.width - left_viewRect; 262 | 263 | if (left_viewRect + horizontalOffset > pointToBeShown.x + HORIZONTAL_SAFE_MARGIN) { 264 | } 265 | else { 266 | pointToBeShown.x = inView.frame.size.width - HORIZONTAL_SAFE_MARGIN; 267 | } 268 | viewRect.origin.x += horizontalOffset; 269 | contentRect.origin.x += horizontalOffset; 270 | popupRect.origin.x += horizontalOffset; 271 | } 272 | } 273 | else { 274 | pointToBeShown = p; 275 | 276 | // calc content area 277 | contentRect.origin.x = p.x - (int)contentBounds.size.width/2; 278 | contentRect.origin.y = p.y + CONTENT_OFFSET.height + POPUP_ROOT_SIZE.height; 279 | contentRect.size = contentBounds.size; 280 | 281 | // calc popup area 282 | popupBounds.origin = CGPointMake(0, 0); 283 | popupBounds.size.width = contentBounds.size.width + CONTENT_OFFSET.width + CONTENT_OFFSET.width; 284 | popupBounds.size.height = contentBounds.size.height + CONTENT_OFFSET.height + CONTENT_OFFSET.height + POPUP_ROOT_SIZE.height; 285 | 286 | popupRect.origin.x = contentRect.origin.x - CONTENT_OFFSET.width; 287 | popupRect.origin.y = contentRect.origin.y - CONTENT_OFFSET.height - POPUP_ROOT_SIZE.height; 288 | popupRect.size = popupBounds.size; 289 | 290 | // calc self size and rect 291 | viewBounds.origin = CGPointMake(0, 0); 292 | viewBounds.size.width = popupRect.size.width + SHADOW_OFFSET.width + SHADOW_OFFSET.width; 293 | viewBounds.size.height = popupRect.size.height + SHADOW_OFFSET.height + SHADOW_OFFSET.height; 294 | 295 | viewRect.origin.x = popupRect.origin.x - SHADOW_OFFSET.width; 296 | viewRect.origin.y = popupRect.origin.y - SHADOW_OFFSET.height; 297 | viewRect.size = viewBounds.size; 298 | 299 | float left_viewRect = viewRect.origin.x + viewRect.size.width; 300 | 301 | // calc horizontal offset 302 | if (viewRect.origin.x < 0) { 303 | direction = direction | UZPopupViewRight; 304 | horizontalOffset = viewRect.origin.x; 305 | 306 | if (viewRect.origin.x - horizontalOffset < pointToBeShown.x - HORIZONTAL_SAFE_MARGIN) { 307 | } 308 | else { 309 | pointToBeShown.x = HORIZONTAL_SAFE_MARGIN; 310 | } 311 | viewRect.origin.x -= horizontalOffset; 312 | contentRect.origin.x -= horizontalOffset; 313 | popupRect.origin.x -= horizontalOffset; 314 | } 315 | else if (left_viewRect > inView.frame.size.width) { 316 | direction = direction | UZPopupViewLeft; 317 | horizontalOffset = inView.frame.size.width - left_viewRect; 318 | 319 | if (left_viewRect + horizontalOffset > pointToBeShown.x + HORIZONTAL_SAFE_MARGIN) { 320 | } 321 | else { 322 | pointToBeShown.x = inView.frame.size.width - HORIZONTAL_SAFE_MARGIN; 323 | } 324 | viewRect.origin.x += horizontalOffset; 325 | contentRect.origin.x += horizontalOffset; 326 | popupRect.origin.x += horizontalOffset; 327 | } 328 | } 329 | 330 | // offset 331 | contentRect.origin.x -= viewRect.origin.x; 332 | contentRect.origin.y -= viewRect.origin.y; 333 | popupRect.origin.x -= viewRect.origin.x; 334 | popupRect.origin.y -= viewRect.origin.y; 335 | pointToBeShown.x -= viewRect.origin.x; 336 | pointToBeShown.y -= viewRect.origin.y; 337 | 338 | BOOL isAlreadyShown = (self.superview == inView); 339 | 340 | if (isAlreadyShown) { 341 | [self setNeedsDisplay]; 342 | 343 | if (animated) { 344 | [UIView beginAnimations:@"move" context:nil]; 345 | [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; 346 | } 347 | self.frame = viewRect; 348 | if (animated) { 349 | [UIView commitAnimations]; 350 | } 351 | } 352 | else { 353 | // set frame 354 | [inView addSubview:self]; 355 | self.frame = viewRect; 356 | 357 | if (_contentView) { 358 | [self addSubview:_contentView]; 359 | [_contentView setFrame:contentRect]; 360 | } 361 | 362 | // popup 363 | if (animated) { 364 | [self popup]; 365 | } 366 | } 367 | } 368 | 369 | #pragma mark - Core Animation call back 370 | 371 | - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag { 372 | [self removeFromSuperview]; 373 | } 374 | 375 | #pragma mark - Make CoreAnimation object 376 | 377 | - (CAKeyframeAnimation*)getAlphaAnimationForPopup { 378 | 379 | CAKeyframeAnimation *alphaAnimation = [CAKeyframeAnimation animationWithKeyPath:@"opacity"]; 380 | alphaAnimation.removedOnCompletion = NO; 381 | alphaAnimation.values = [NSArray arrayWithObjects: 382 | [NSNumber numberWithFloat:0], 383 | [NSNumber numberWithFloat:0.7], 384 | [NSNumber numberWithFloat:1], 385 | nil]; 386 | alphaAnimation.keyTimes = [NSArray arrayWithObjects: 387 | [NSNumber numberWithFloat:0], 388 | [NSNumber numberWithFloat:0.1], 389 | [NSNumber numberWithFloat:1], 390 | nil]; 391 | return alphaAnimation; 392 | } 393 | 394 | - (CAKeyframeAnimation*)getPositionAnimationForPopup { 395 | 396 | float r1 = 0.1; 397 | float r2 = 1.4; 398 | float r3 = 1; 399 | float r4 = 0.8; 400 | float r5 = 1; 401 | 402 | float y_offset = (popupRect.size.height/2 - POPUP_ROOT_SIZE.height); 403 | 404 | CAKeyframeAnimation *positionAnimation = [CAKeyframeAnimation animationWithKeyPath:@"transform"]; 405 | CATransform3D tm1, tm2, tm3, tm4, tm5; 406 | 407 | if (direction & UZPopupViewUp) { 408 | if (direction & UZPopupViewLeft) 409 | horizontalOffset = -horizontalOffset; 410 | tm1 = CATransform3DMakeTranslation(horizontalOffset * (1 - r1), y_offset * (1 - r1), 0); 411 | tm2 = CATransform3DMakeTranslation(horizontalOffset * (1 - r2), y_offset * (1 - r2), 0); 412 | tm3 = CATransform3DMakeTranslation(horizontalOffset * (1 - r3), y_offset * (1 - r3), 0); 413 | tm4 = CATransform3DMakeTranslation(horizontalOffset * (1 - r4), y_offset * (1 - r4), 0); 414 | tm5 = CATransform3DMakeTranslation(horizontalOffset * (1 - r5), y_offset * (1 - r5), 0); 415 | } 416 | else { 417 | if (direction & UZPopupViewLeft) 418 | horizontalOffset = -horizontalOffset; 419 | tm1 = CATransform3DMakeTranslation(horizontalOffset * (1 - r1), -y_offset * (1 - r1), 0); 420 | tm2 = CATransform3DMakeTranslation(horizontalOffset * (1 - r2), -y_offset * (1 - r2), 0); 421 | tm3 = CATransform3DMakeTranslation(horizontalOffset * (1 - r3), -y_offset * (1 - r3), 0); 422 | tm4 = CATransform3DMakeTranslation(horizontalOffset * (1 - r4), -y_offset * (1 - r4), 0); 423 | tm5 = CATransform3DMakeTranslation(horizontalOffset * (1 - r5), -y_offset * (1 - r5), 0); 424 | } 425 | tm1 = CATransform3DScale(tm1, r1, r1, 1); 426 | tm2 = CATransform3DScale(tm2, r2, r2, 1); 427 | tm3 = CATransform3DScale(tm3, r3, r3, 1); 428 | tm4 = CATransform3DScale(tm4, r4, r4, 1); 429 | tm5 = CATransform3DScale(tm5, r5, r5, 1); 430 | 431 | positionAnimation.values = [NSArray arrayWithObjects: 432 | [NSValue valueWithCATransform3D:tm1], 433 | [NSValue valueWithCATransform3D:tm2], 434 | [NSValue valueWithCATransform3D:tm3], 435 | [NSValue valueWithCATransform3D:tm4], 436 | [NSValue valueWithCATransform3D:tm5], 437 | nil]; 438 | positionAnimation.keyTimes = [NSArray arrayWithObjects: 439 | [NSNumber numberWithFloat:0.0], 440 | [NSNumber numberWithFloat:0.2], 441 | [NSNumber numberWithFloat:0.4], 442 | [NSNumber numberWithFloat:0.7], 443 | [NSNumber numberWithFloat:1.0], 444 | nil]; 445 | return positionAnimation; 446 | } 447 | 448 | #pragma mark - Popup and dismiss 449 | 450 | - (void)popup { 451 | 452 | CAKeyframeAnimation *positionAnimation = [self getPositionAnimationForPopup]; 453 | CAKeyframeAnimation *alphaAnimation = [self getAlphaAnimationForPopup]; 454 | 455 | CAAnimationGroup *group = [CAAnimationGroup animation]; 456 | group.animations = [NSArray arrayWithObjects:positionAnimation, alphaAnimation, nil]; 457 | group.duration = POPUP_ANIMATION_DURATION; 458 | group.removedOnCompletion = YES; 459 | group.fillMode = kCAFillModeForwards; 460 | 461 | [self.layer addAnimation:group forKey:@"hoge"]; 462 | } 463 | 464 | - (BOOL)shouldBeDismissedFor:(NSSet *)touches withEvent:(UIEvent *)event { 465 | UITouch *touch = [touches anyObject]; 466 | 467 | CGPoint p = [touch locationInView:self]; 468 | return !CGRectContainsPoint(contentRect, p); 469 | } 470 | 471 | - (void)dismissModal { 472 | if ([peekView superview]) 473 | [_delegate didDismissModal:self]; 474 | [peekView removeFromSuperview]; 475 | 476 | [self dismiss:animatedWhenAppering]; 477 | } 478 | 479 | - (void)dismiss:(BOOL)animtaed { 480 | if (animtaed) 481 | [self dismiss]; 482 | else { 483 | [self removeFromSuperview]; 484 | } 485 | } 486 | 487 | - (void)dismiss { 488 | CAKeyframeAnimation *positionAnimation = [CAKeyframeAnimation animationWithKeyPath:@"transform"]; 489 | 490 | float r1 = 1.0; 491 | float r2 = 0.1; 492 | 493 | float y_offset = (popupRect.size.height/2 - POPUP_ROOT_SIZE.height); 494 | 495 | CAKeyframeAnimation *alphaAnimation = [CAKeyframeAnimation animationWithKeyPath:@"opacity"]; 496 | alphaAnimation.removedOnCompletion = NO; 497 | alphaAnimation.values = [NSArray arrayWithObjects: 498 | [NSNumber numberWithFloat:1], 499 | [NSNumber numberWithFloat:0], 500 | nil]; 501 | alphaAnimation.keyTimes = [NSArray arrayWithObjects: 502 | [NSNumber numberWithFloat:0], 503 | [NSNumber numberWithFloat:1], 504 | nil]; 505 | 506 | CATransform3D tm1, tm2; 507 | if (direction & UZPopupViewUp) { 508 | tm1 = CATransform3DMakeTranslation(horizontalOffset * (1 - r1), y_offset * (1 - r1), 0); 509 | tm2 = CATransform3DMakeTranslation(horizontalOffset * (1 - r2), y_offset * (1 - r2), 0); 510 | } 511 | else { 512 | tm1 = CATransform3DMakeTranslation(horizontalOffset * (1 - r1), -y_offset * (1 - r1), 0); 513 | tm2 = CATransform3DMakeTranslation(horizontalOffset * (1 - r2), -y_offset * (1 - r2), 0); 514 | 515 | } 516 | tm1 = CATransform3DScale(tm1, r1, r1, 1); 517 | tm2 = CATransform3DScale(tm2, r2, r2, 1); 518 | 519 | positionAnimation.values = [NSArray arrayWithObjects: 520 | [NSValue valueWithCATransform3D:tm1], 521 | [NSValue valueWithCATransform3D:tm2], 522 | nil]; 523 | positionAnimation.keyTimes = [NSArray arrayWithObjects: 524 | [NSNumber numberWithFloat:0], 525 | [NSNumber numberWithFloat:1.0], 526 | nil]; 527 | 528 | CAAnimationGroup *group = [CAAnimationGroup animation]; 529 | group.animations = [NSArray arrayWithObjects:positionAnimation, alphaAnimation, nil]; 530 | group.duration = DISMISS_ANIMATION_DURATION; 531 | group.removedOnCompletion = NO; 532 | group.fillMode = kCAFillModeForwards; 533 | group.delegate = self; 534 | 535 | [self.layer addAnimation:group forKey:@"hoge"]; 536 | } 537 | 538 | #pragma mark - Drawing 539 | 540 | - (void)makePathCircleCornerRect:(CGRect)rect radius:(float)radius popPoint:(CGPoint)popPoint { 541 | CGContextRef context = UIGraphicsGetCurrentContext(); 542 | 543 | if (direction & UZPopupViewUp) { 544 | rect.size.height -= POPUP_ROOT_SIZE.height; 545 | 546 | // get points 547 | CGFloat minx = CGRectGetMinX( rect ), midx = CGRectGetMidX( rect ), maxx = CGRectGetMaxX( rect ); 548 | CGFloat miny = CGRectGetMinY( rect ), midy = CGRectGetMidY( rect ), maxy = CGRectGetMaxY( rect ); 549 | 550 | CGFloat popRightEdgeX = popPoint.x + (int)POPUP_ROOT_SIZE.width / 2; 551 | CGFloat popRightEdgeY = maxy; 552 | 553 | CGFloat popLeftEdgeX = popPoint.x - (int)POPUP_ROOT_SIZE.width / 2; 554 | CGFloat popLeftEdgeY = maxy; 555 | 556 | CGContextMoveToPoint(context, minx, midy); 557 | CGContextAddArcToPoint(context, minx, miny, midx, miny, radius); 558 | CGContextAddArcToPoint(context, maxx, miny, maxx, midy, radius); 559 | 560 | 561 | CGContextAddArcToPoint(context, maxx, maxy, popRightEdgeX, popRightEdgeY, radius); 562 | CGContextAddLineToPoint(context, popRightEdgeX, popRightEdgeY); 563 | CGContextAddLineToPoint(context, popPoint.x, popPoint.y); 564 | CGContextAddLineToPoint(context, popLeftEdgeX, popLeftEdgeY); 565 | CGContextAddArcToPoint(context, minx, maxy, minx, midy, radius); 566 | CGContextAddLineToPoint(context, minx, midy); 567 | 568 | } 569 | else { 570 | rect.origin.y += POPUP_ROOT_SIZE.height; 571 | rect.size.height -= POPUP_ROOT_SIZE.height; 572 | 573 | // get points 574 | CGFloat minx = CGRectGetMinX( rect ), midx = CGRectGetMidX( rect ), maxx = CGRectGetMaxX( rect ); 575 | CGFloat miny = CGRectGetMinY( rect ), midy = CGRectGetMidY( rect ), maxy = CGRectGetMaxY( rect ); 576 | 577 | CGFloat popRightEdgeX = popPoint.x + (int)POPUP_ROOT_SIZE.width / 2; 578 | CGFloat popRightEdgeY = miny; 579 | 580 | CGFloat popLeftEdgeX = popPoint.x - (int)POPUP_ROOT_SIZE.width / 2; 581 | CGFloat popLeftEdgeY = miny; 582 | 583 | CGContextMoveToPoint(context, minx, midy); 584 | CGContextAddArcToPoint(context, minx, miny, midx, miny, radius); 585 | CGContextAddLineToPoint(context, popLeftEdgeX, popLeftEdgeY); 586 | CGContextAddLineToPoint(context, popPoint.x, popPoint.y); 587 | CGContextAddLineToPoint(context, popRightEdgeX, popRightEdgeY); 588 | CGContextAddArcToPoint(context, maxx, miny, maxx, midy, radius); 589 | CGContextAddArcToPoint(context, maxx, maxy, midx, maxy, radius); 590 | CGContextAddArcToPoint(context, minx, maxy, minx, midy, radius); 591 | } 592 | } 593 | 594 | - (void)makeGrowingPathCircleCornerRect:(CGRect)rect radius:(float)radius { 595 | CGContextRef context = UIGraphicsGetCurrentContext(); 596 | 597 | rect.origin.y += 1; 598 | rect.origin.x += 1; 599 | rect.size.width -= 2; 600 | 601 | 602 | // get points 603 | CGFloat minx = CGRectGetMinX( rect ), midx = CGRectGetMidX( rect ), maxx = CGRectGetMaxX( rect ); 604 | CGFloat miny = CGRectGetMinY( rect ), midy = CGRectGetMidY( rect ); 605 | 606 | CGFloat rightEdgeX = minx; 607 | CGFloat rightEdgeY = midy - 10; 608 | 609 | CGFloat leftEdgeX = maxx; 610 | CGFloat leftEdgeY = midy - 10; 611 | 612 | CGContextMoveToPoint(context, rightEdgeX, rightEdgeY); 613 | CGContextAddArcToPoint(context, minx, miny, midx, miny, radius); 614 | CGContextAddArcToPoint(context, maxx, miny, maxx, midy, radius); 615 | CGContextAddLineToPoint(context, leftEdgeX, leftEdgeY); 616 | } 617 | 618 | #pragma mark - Override 619 | 620 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 621 | DNSLogMethod(); 622 | 623 | if ([self shouldBeDismissedFor:touches withEvent:event] && peekView != nil) { 624 | [self dismissModal]; 625 | return; 626 | } 627 | 628 | if ([target respondsToSelector:action]) { 629 | #if 1 630 | IMP imp = [target methodForSelector:action]; 631 | void (*func)(id, SEL, id) = (void *)imp; 632 | func(target, action, self); 633 | #else 634 | [target performSelector:action withObject:self]; 635 | #endif 636 | } 637 | } 638 | 639 | - (void)drawRect:(CGRect)rect { 640 | 641 | CGContextRef context = UIGraphicsGetCurrentContext(); 642 | 643 | #ifdef _CONFIRM_REGION 644 | CGContextFillRect(context, rect); 645 | CGContextSetRGBFillColor(context, 1, 0, 0, 1); 646 | CGContextFillRect(context, popupRect); 647 | CGContextSetRGBFillColor(context, 1, 1, 0, 1); 648 | CGContextFillRect(context, contentRect); 649 | #endif 650 | 651 | // draw shadow, and base 652 | CGContextSaveGState(context); 653 | 654 | CGContextSetRGBFillColor(context, 0.1, 0.1, 0.1, ALPHA); 655 | CGContextSetShadowWithColor (context, CGSizeMake(0, 2), 2, [[UIColor colorWithRed:0 green:0 blue:0 alpha:0.5] CGColor]); 656 | [self makePathCircleCornerRect:popupRect radius:10 popPoint:pointToBeShown]; 657 | CGContextClosePath(context); 658 | CGContextFillPath(context); 659 | CGContextRestoreGState(context); 660 | 661 | // draw body 662 | CGContextSaveGState(context); 663 | [self makePathCircleCornerRect:popupRect radius:10 popPoint:pointToBeShown]; 664 | CGContextClip(context); 665 | if (direction & UZPopupViewUp) { 666 | CGPoint pt1 = CGPointMake(0, popupRect.origin.y); 667 | CGPoint pt2 = CGPointMake(0, popupRect.origin.y + (int)(popupRect.size.height-POPUP_ROOT_SIZE.height)/2); 668 | CGContextDrawLinearGradient(context, gradient, pt1, pt2, 0); 669 | CGPoint pt3 = pt2; 670 | CGPoint pt4 = CGPointMake(0, popupRect.origin.y + popupRect.size.height-POPUP_ROOT_SIZE.height); 671 | CGContextDrawLinearGradient(context, gradient2, pt3, pt4, 0); 672 | } 673 | else { 674 | int h = (int)(popupRect.size.height - POPUP_ROOT_SIZE.height); 675 | CGPoint pt1 = CGPointMake(0, popupRect.origin.y + POPUP_ROOT_SIZE.height); 676 | CGPoint pt2 = CGPointMake(0, popupRect.origin.y + h/2 + POPUP_ROOT_SIZE.height); 677 | CGContextDrawLinearGradient(context, gradient, pt1, pt2, 0); 678 | CGPoint pt3 = pt2; 679 | CGPoint pt4 = CGPointMake(0, popupRect.origin.y + popupRect.size.height); 680 | CGContextDrawLinearGradient(context, gradient2, pt3, pt4, 0); 681 | } 682 | CGContextRestoreGState(context); 683 | 684 | // draw content 685 | if ([_title length]) { 686 | CGContextSetRGBFillColor(context, 1, 1, 1, 1); 687 | UIFont *font = [UIFont boldSystemFontOfSize:fontSize]; 688 | UIColor *color = [UIColor whiteColor]; 689 | [_title drawInRect:contentRect withAttributes:@{NSFontAttributeName:font, NSForegroundColorAttributeName:color}]; 690 | } 691 | if (_image) { 692 | [_image drawInRect:contentRect]; 693 | } 694 | } 695 | 696 | #pragma mark - dealloc 697 | 698 | - (void)dealloc { 699 | DNSLogMethod(); 700 | CGGradientRelease(gradient); 701 | CGGradientRelease(gradient2); 702 | } 703 | 704 | @end 705 | 706 | 707 | @implementation UZPopupView(UsingPrivateMethod) 708 | 709 | - (void)presentModalFromBarButtonItem:(UIBarButtonItem*)barButtonItem inView:(UIView*)inView { 710 | animatedWhenAppering = YES; 711 | [self createAndAttachTouchPeekView]; 712 | [self showFromBarButtonItem:barButtonItem inView:[[UIApplication sharedApplication] keyWindow]]; 713 | } 714 | 715 | - (void)presentModalFromBarButtonItem:(UIBarButtonItem*)barButtonItem inView:(UIView*)inView animated:(BOOL)animated { 716 | animatedWhenAppering = animated; 717 | [self createAndAttachTouchPeekView]; 718 | [self showFromBarButtonItem:barButtonItem inView:[[UIApplication sharedApplication] keyWindow] animated:animated]; 719 | } 720 | 721 | - (void)showFromBarButtonItem:(UIBarButtonItem*)barButtonItem inView:(UIView*)inView { 722 | [self showFromBarButtonItem:barButtonItem inView:inView animated:YES]; 723 | } 724 | 725 | - (void)showFromBarButtonItem:(UIBarButtonItem*)barButtonItem inView:(UIView*)inView animated:(BOOL)animated { 726 | 727 | if(![barButtonItem respondsToSelector:@selector(view)]) { 728 | // error 729 | return; 730 | } 731 | 732 | UIView *targetView = (UIView *)[barButtonItem performSelector:@selector(view)]; 733 | UIView *targetSuperview = [targetView superview]; 734 | 735 | BOOL isOnNavigationBar = YES; 736 | 737 | if ([targetSuperview isKindOfClass:[UINavigationBar class]]) { 738 | isOnNavigationBar = YES; 739 | } 740 | else if ([targetSuperview isKindOfClass:[UIToolbar class]]) { 741 | isOnNavigationBar = NO; 742 | } 743 | else { 744 | // error 745 | return; 746 | } 747 | 748 | CGRect rect = [targetSuperview convertRect:targetView.frame toView:inView]; 749 | 750 | CGPoint p; 751 | p.x = rect.origin.x + (int)rect.size.width/2; 752 | 753 | if (isOnNavigationBar) 754 | p.y = rect.origin.y + rect.size.height + BAR_BUTTON_ITEM_UPPER_MARGIN; 755 | else 756 | p.y = rect.origin.y - BAR_BUTTON_ITEM_BOTTOM_MARGIN; 757 | 758 | [self showAtPoint:p inView:inView animated:animated]; 759 | } 760 | 761 | @end 762 | -------------------------------------------------------------------------------- /sd201206.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/PopupView/24c66f3faf3f6c4f10eea70b54f3e1fa37d2f8f6/sd201206.pdf --------------------------------------------------------------------------------