├── .gitignore ├── ICTutorialOverlay.podspec ├── ICTutorialOverlay ├── Classes │ ├── ICTutorialOverlay.h │ └── ICTutorialOverlay.m └── ICTutorialOverlay.xcodeproj │ └── project.pbxproj ├── ICTutorialOverlayDemo ├── ICTutorialOverlayDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── ICTutorialOverlayDemo.xccheckout ├── ICTutorialOverlayDemo.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── ICTutorialOverlayDemo.xccheckout ├── ICTutorialOverlayDemo │ ├── Default-568h@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── ICAppDelegate.h │ ├── ICAppDelegate.m │ ├── ICTutorialOverlayDemo-Info.plist │ ├── ICTutorialOverlayDemo-Prefix.pch │ ├── ICViewController.h │ ├── ICViewController.m │ ├── en.lproj │ │ ├── ICViewController.xib │ │ └── InfoPlist.strings │ └── main.m ├── Podfile ├── Podfile.lock └── Pods │ ├── Headers │ └── Public │ │ └── ICTutorialOverlay │ │ └── ICTutorialOverlay.h │ ├── ICTutorialOverlay │ ├── ICTutorialOverlay │ │ └── Classes │ │ │ ├── ICTutorialOverlay.h │ │ │ └── ICTutorialOverlay.m │ ├── LICENSE │ └── README.md │ ├── Manifest.lock │ ├── Pods.xcodeproj │ └── project.pbxproj │ └── Target Support Files │ ├── Pods-ICTutorialOverlay │ ├── Pods-ICTutorialOverlay-Private.xcconfig │ ├── Pods-ICTutorialOverlay-dummy.m │ ├── Pods-ICTutorialOverlay-prefix.pch │ └── Pods-ICTutorialOverlay.xcconfig │ └── Pods │ ├── Pods-acknowledgements.markdown │ ├── Pods-acknowledgements.plist │ ├── Pods-dummy.m │ ├── Pods-environment.h │ ├── Pods-resources.sh │ ├── Pods.debug.xcconfig │ └── Pods.release.xcconfig ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | profile 14 | *.moved-aside 15 | DerivedData 16 | .idea/ 17 | -------------------------------------------------------------------------------- /ICTutorialOverlay.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "ICTutorialOverlay" 3 | s.version = "0.0.6" 4 | s.summary = "Tutorial overlay which allows you to make specific views transparent (highlighted)." 5 | s.homepage = "https://github.com/i110/ICTutorialOverlay" 6 | s.license = { :type => 'MIT', :file => 'LICENSE' } 7 | s.author = { "Ichito Nagata" => "i.nagata110@gmail.com" } 8 | s.source = { :git => "https://github.com/i110/ICTutorialOverlay.git", :tag => "0.0.6" } 9 | s.platform = :ios, '5.1' 10 | s.source_files = 'ICTutorialOverlay/**/*.{h,m}' 11 | # s.resources = "ICTutorialOverlay/Resources/*" 12 | s.requires_arc = true 13 | s.frameworks = 'QuartzCore' 14 | 15 | end 16 | -------------------------------------------------------------------------------- /ICTutorialOverlay/Classes/ICTutorialOverlay.h: -------------------------------------------------------------------------------- 1 | // 2 | // ICTutorialOverlay.h 3 | // ICTutorialOverlay 4 | // 5 | // Created by Ichito Nagata on 2013/08/19. 6 | // 7 | // 8 | 9 | #import 10 | 11 | typedef enum { 12 | ICTutorialOverlayHoleFormRectangle = 0, 13 | ICTutorialOverlayHoleFormCircle = 1, 14 | ICTutorialOverlayHoleFormRoundedRectangle = 2, 15 | } ICTutorialOverlayHoleForm; 16 | 17 | @interface ICTutorialOverlayHole : NSObject 18 | 19 | @property (nonatomic) CGRect rect; 20 | @property (nonatomic) ICTutorialOverlayHoleForm form; 21 | @property (nonatomic) BOOL transparentEvent; 22 | @property (nonatomic) UIView *boundView; 23 | 24 | - (UIBezierPath*)bezierPath; 25 | - (BOOL)containsPoint:(CGPoint)point; 26 | 27 | @end 28 | 29 | @interface ICTutorialOverlay : UIView 30 | 31 | @property (nonatomic) BOOL animated; 32 | @property (nonatomic) BOOL hideWhenTapped; 33 | @property (nonatomic, copy) void(^willShowCallback)(); 34 | @property (nonatomic, copy) void(^didShowCallback)(); 35 | @property (nonatomic, copy) void(^willHideCallback)(); 36 | @property (nonatomic, copy) void(^didHideCallback)(); 37 | @property (nonatomic, readonly) BOOL isShown; 38 | 39 | - (ICTutorialOverlayHole*)addHoleWithRect:(CGRect)rect form:(ICTutorialOverlayHoleForm)form transparentEvent:(BOOL)transparentEvent; 40 | - (ICTutorialOverlayHole*)addHoleWithView:(UIView*)view padding:(CGFloat)padding offset:(CGSize)offset form:(ICTutorialOverlayHoleForm)form transparentEvent:(BOOL)transparentEvent; 41 | 42 | - (void)show; 43 | - (void)hide; 44 | 45 | + (ICTutorialOverlay*)showingOverlay; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /ICTutorialOverlay/Classes/ICTutorialOverlay.m: -------------------------------------------------------------------------------- 1 | // 2 | // ICTutorialOverlay.m 3 | // ICTutorialOverlay 4 | // 5 | // Created by Ichito Nagata on 2013/08/19. 6 | // 7 | // 8 | 9 | #define ANIMATION_DURATION 0.4f 10 | 11 | #import "ICTutorialOverlay.h" 12 | 13 | #import 14 | 15 | #pragma mark - 16 | #pragma mark ICTutorialOverlayHole 17 | 18 | @implementation ICTutorialOverlayHole 19 | 20 | - (UIBezierPath*)bezierPath 21 | { 22 | UIBezierPath *path; 23 | switch (self.form) { 24 | case ICTutorialOverlayHoleFormRectangle: 25 | path = [UIBezierPath bezierPathWithRect:self.rect]; 26 | break; 27 | case ICTutorialOverlayHoleFormCircle: 28 | path = [UIBezierPath bezierPathWithOvalInRect:self.rect]; 29 | break; 30 | case ICTutorialOverlayHoleFormRoundedRectangle: 31 | path = [UIBezierPath bezierPathWithRoundedRect:self.rect cornerRadius:7.0f]; 32 | break; 33 | default: 34 | break; 35 | } 36 | return path; 37 | } 38 | 39 | - (BOOL)containsPoint:(CGPoint)point 40 | { 41 | if (self.boundView) { 42 | UIView *rootView = self.boundView; 43 | while (rootView.superview) { 44 | rootView = rootView.superview; 45 | } 46 | CGRect rect = [self.boundView convertRect:self.boundView.bounds toView:rootView]; 47 | return CGRectContainsPoint(rect, point); 48 | } 49 | 50 | UIBezierPath *path = [self bezierPath]; 51 | if (path == nil) { 52 | return YES; 53 | } 54 | return [path containsPoint:point]; 55 | } 56 | 57 | @end 58 | 59 | #pragma mark - 60 | #pragma mark ICTutorialOverlay 61 | 62 | @interface ICTutorialOverlay () 63 | { 64 | NSMutableArray *holes; 65 | } 66 | @end 67 | 68 | @implementation ICTutorialOverlay 69 | 70 | static ICTutorialOverlay *showingOverlay; 71 | + (ICTutorialOverlay*)showingOverlay 72 | { 73 | return showingOverlay; 74 | } 75 | 76 | - (void)initialize 77 | { 78 | holes = [NSMutableArray array]; 79 | self.opaque = NO; 80 | self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.3]; 81 | self.hideWhenTapped = NO; 82 | } 83 | 84 | - (id)initWithFrame:(CGRect)frame 85 | { 86 | self = [super initWithFrame:frame]; 87 | if (self) { 88 | [self initialize]; 89 | 90 | } 91 | return self; 92 | } 93 | 94 | - (id)initWithCoder:(NSCoder *)aDecoder 95 | { 96 | self = [super initWithCoder:aDecoder]; 97 | if (self) { 98 | [self initialize]; 99 | } 100 | return self; 101 | } 102 | 103 | - (ICTutorialOverlayHole*)addHoleWithRect:(CGRect)rect form:(ICTutorialOverlayHoleForm)form transparentEvent:(BOOL)transparentEvent 104 | { 105 | ICTutorialOverlayHole *hole = [[ICTutorialOverlayHole alloc] init]; 106 | hole.rect = rect; 107 | hole.form = form; 108 | hole.transparentEvent = transparentEvent; 109 | [holes addObject:hole]; 110 | return hole; 111 | } 112 | 113 | - (ICTutorialOverlayHole*)addHoleWithView:(UIView*)view padding:(CGFloat)padding offset:(CGSize)offset form:(ICTutorialOverlayHoleForm)form transparentEvent:(BOOL)transparentEvent 114 | { 115 | UIView *rootView = view; 116 | while (rootView.superview) { 117 | rootView = rootView.superview; 118 | } 119 | CGRect rect = [view convertRect:view.bounds toView:rootView]; 120 | 121 | CGSize paddingSize = [self calculatePaddingSizeWithRect:rect defaultPadding:padding form:form]; 122 | rect.origin.x += offset.width - paddingSize.width; 123 | rect.origin.y += offset.height - paddingSize.height; 124 | rect.size.width += paddingSize.width * 2; 125 | rect.size.height += paddingSize.height * 2; 126 | 127 | ICTutorialOverlayHole *hole = [self addHoleWithRect:rect form:form transparentEvent:transparentEvent]; 128 | hole.boundView = view; 129 | return hole; 130 | } 131 | 132 | - (CGSize)calculatePaddingSizeWithRect:(CGRect)rect defaultPadding:(CGFloat)defaultPadding form:(ICTutorialOverlayHoleForm)form 133 | { 134 | if (rect.size.width == 0 || rect.size.height == 0) { 135 | return CGSizeMake(defaultPadding, defaultPadding); 136 | } 137 | 138 | CGSize paddingSize; 139 | switch (form) { 140 | case ICTutorialOverlayHoleFormRectangle: 141 | case ICTutorialOverlayHoleFormRoundedRectangle: 142 | { 143 | paddingSize.width = defaultPadding; 144 | paddingSize.height = defaultPadding; 145 | break; 146 | } 147 | case ICTutorialOverlayHoleFormCircle: 148 | { 149 | CGFloat w = rect.size.width; 150 | CGFloat h = rect.size.height; 151 | CGFloat theta = atan2f(h, w); 152 | CGFloat sin = sinf(theta); 153 | CGFloat cos = cosf(theta); 154 | CGFloat coef = sqrtf(sin * sin + (h * h) / (w * w) * cos * cos); 155 | CGFloat cw = w * coef / sin; 156 | CGFloat ch = h * coef / sin; 157 | paddingSize.width = (cw - w) / 2 + defaultPadding; 158 | paddingSize.height = (ch - h) / 2 + defaultPadding; 159 | break; 160 | } 161 | default: 162 | break; 163 | } 164 | 165 | return paddingSize; 166 | } 167 | 168 | - (void)drawRect:(CGRect)rect 169 | { 170 | CGContextRef context = UIGraphicsGetCurrentContext(); 171 | CGContextSaveGState(context); 172 | 173 | CGContextSetFillColorWithColor(context, self.backgroundColor.CGColor); 174 | CGContextFillRect(context, rect); 175 | 176 | for (ICTutorialOverlayHole *hole in holes) { 177 | if(! CGRectIsEmpty(CGRectIntersection(hole.rect, rect))) { 178 | UIBezierPath *path = [hole bezierPath]; 179 | if (path) { 180 | [path fillWithBlendMode:kCGBlendModeClear alpha:1]; 181 | } 182 | } 183 | } 184 | 185 | CGContextRestoreGState(context); 186 | } 187 | 188 | 189 | - (void)show 190 | { 191 | if (self.isShown) { 192 | return; 193 | } 194 | 195 | if (showingOverlay) { 196 | [showingOverlay hide]; 197 | } 198 | 199 | showingOverlay = self; 200 | 201 | if (self.willShowCallback) { 202 | self.willShowCallback(); 203 | } 204 | 205 | UIWindow *window = [UIApplication sharedApplication].keyWindow; 206 | self.frame = window.bounds; 207 | [window addSubview:self]; 208 | [window bringSubviewToFront:self]; 209 | 210 | if (self.animated) { 211 | self.alpha = 0.0f; 212 | [UIView animateWithDuration:ANIMATION_DURATION animations:^{ 213 | self.alpha = 1.0f; 214 | } completion:^(BOOL finished) { 215 | if (finished) { 216 | if (self.didShowCallback) { 217 | self.didShowCallback(); 218 | } 219 | } 220 | }]; 221 | } else { 222 | if (self.didShowCallback) { 223 | self.didShowCallback(); 224 | } 225 | } 226 | 227 | } 228 | 229 | - (void)hide 230 | { 231 | if (! self.isShown) { 232 | return; 233 | } 234 | 235 | showingOverlay = nil; 236 | 237 | if (self.willHideCallback) { 238 | self.willHideCallback(); 239 | } 240 | 241 | if (self.animated) { 242 | self.alpha = 1.0f; 243 | [UIView animateWithDuration:ANIMATION_DURATION animations:^{ 244 | self.alpha = 0.0f; 245 | } completion:^(BOOL finished) { 246 | if (finished) { 247 | [self removeFromSuperview]; 248 | if (self.didHideCallback) { 249 | self.didHideCallback(); 250 | } 251 | } 252 | }]; 253 | } else { 254 | [self removeFromSuperview]; 255 | if (self.didHideCallback) { 256 | self.didHideCallback(); 257 | } 258 | } 259 | 260 | 261 | 262 | } 263 | 264 | - (BOOL)isShown 265 | { 266 | return self.superview != nil; 267 | } 268 | 269 | - (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event { 270 | 271 | for (ICTutorialOverlayHole *hole in holes) { 272 | if (! hole.transparentEvent) { 273 | continue; 274 | } 275 | if ([hole containsPoint:point]) { 276 | return NO; 277 | } 278 | } 279 | return YES; 280 | } 281 | 282 | - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event 283 | { 284 | if (self.hideWhenTapped) { 285 | [self hide]; 286 | } 287 | } 288 | 289 | @end 290 | -------------------------------------------------------------------------------- /ICTutorialOverlay/ICTutorialOverlay.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXFileReference section */ 10 | 08A7841517C1279600B6F81D /* ICTutorialOverlay.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ICTutorialOverlay.h; sourceTree = ""; }; 11 | 08A7841617C1279600B6F81D /* ICTutorialOverlay.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ICTutorialOverlay.m; sourceTree = ""; }; 12 | /* End PBXFileReference section */ 13 | 14 | /* Begin PBXGroup section */ 15 | 08A783DD17C1262A00B6F81D = { 16 | isa = PBXGroup; 17 | children = ( 18 | 08A783E417C1263600B6F81D /* Classes */, 19 | 08A783E517C1264E00B6F81D /* Resources */, 20 | ); 21 | sourceTree = ""; 22 | }; 23 | 08A783E417C1263600B6F81D /* Classes */ = { 24 | isa = PBXGroup; 25 | children = ( 26 | 08A7841517C1279600B6F81D /* ICTutorialOverlay.h */, 27 | 08A7841617C1279600B6F81D /* ICTutorialOverlay.m */, 28 | ); 29 | path = Classes; 30 | sourceTree = ""; 31 | }; 32 | 08A783E517C1264E00B6F81D /* Resources */ = { 33 | isa = PBXGroup; 34 | children = ( 35 | ); 36 | path = Resources; 37 | sourceTree = ""; 38 | }; 39 | /* End PBXGroup section */ 40 | 41 | /* Begin PBXProject section */ 42 | 08A783DE17C1262A00B6F81D /* Project object */ = { 43 | isa = PBXProject; 44 | attributes = { 45 | LastUpgradeCheck = 0460; 46 | }; 47 | buildConfigurationList = 08A783E117C1262A00B6F81D /* Build configuration list for PBXProject "ICTutorialOverlay" */; 48 | compatibilityVersion = "Xcode 3.2"; 49 | developmentRegion = English; 50 | hasScannedForEncodings = 0; 51 | knownRegions = ( 52 | en, 53 | ); 54 | mainGroup = 08A783DD17C1262A00B6F81D; 55 | projectDirPath = ""; 56 | projectRoot = ""; 57 | targets = ( 58 | ); 59 | }; 60 | /* End PBXProject section */ 61 | 62 | /* Begin XCBuildConfiguration section */ 63 | 08A783E217C1262A00B6F81D /* Debug */ = { 64 | isa = XCBuildConfiguration; 65 | buildSettings = { 66 | }; 67 | name = Debug; 68 | }; 69 | 08A783E317C1262A00B6F81D /* Release */ = { 70 | isa = XCBuildConfiguration; 71 | buildSettings = { 72 | }; 73 | name = Release; 74 | }; 75 | /* End XCBuildConfiguration section */ 76 | 77 | /* Begin XCConfigurationList section */ 78 | 08A783E117C1262A00B6F81D /* Build configuration list for PBXProject "ICTutorialOverlay" */ = { 79 | isa = XCConfigurationList; 80 | buildConfigurations = ( 81 | 08A783E217C1262A00B6F81D /* Debug */, 82 | 08A783E317C1262A00B6F81D /* Release */, 83 | ); 84 | defaultConfigurationIsVisible = 0; 85 | defaultConfigurationName = Release; 86 | }; 87 | /* End XCConfigurationList section */ 88 | }; 89 | rootObject = 08A783DE17C1262A00B6F81D /* Project object */; 90 | } 91 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/ICTutorialOverlayDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | archiveVersion 6 | 1 7 | classes 8 | 9 | objectVersion 10 | 46 11 | objects 12 | 13 | 08A783E617C1267600B6F81D 14 | 15 | children 16 | 17 | 08A783F817C1267600B6F81D 18 | 08A783F117C1267600B6F81D 19 | 08A783F017C1267600B6F81D 20 | 70B1D830EE4A25D6074883F0 21 | 22 | isa 23 | PBXGroup 24 | sourceTree 25 | <group> 26 | 27 | 08A783E717C1267600B6F81D 28 | 29 | attributes 30 | 31 | CLASSPREFIX 32 | IC 33 | LastUpgradeCheck 34 | 0460 35 | ORGANIZATIONNAME 36 | Ichito Nagata 37 | 38 | buildConfigurationList 39 | 08A783EA17C1267600B6F81D 40 | compatibilityVersion 41 | Xcode 3.2 42 | developmentRegion 43 | English 44 | hasScannedForEncodings 45 | 0 46 | isa 47 | PBXProject 48 | knownRegions 49 | 50 | en 51 | 52 | mainGroup 53 | 08A783E617C1267600B6F81D 54 | productRefGroup 55 | 08A783F017C1267600B6F81D 56 | projectDirPath 57 | 58 | projectReferences 59 | 60 | projectRoot 61 | 62 | targets 63 | 64 | 08A783EE17C1267600B6F81D 65 | 66 | 67 | 08A783EA17C1267600B6F81D 68 | 69 | buildConfigurations 70 | 71 | 08A7841017C1267600B6F81D 72 | 08A7841117C1267600B6F81D 73 | 74 | defaultConfigurationIsVisible 75 | 0 76 | defaultConfigurationName 77 | Release 78 | isa 79 | XCConfigurationList 80 | 81 | 08A783EB17C1267600B6F81D 82 | 83 | buildActionMask 84 | 2147483647 85 | files 86 | 87 | 08A783FF17C1267600B6F81D 88 | 08A7840317C1267600B6F81D 89 | 08A7840C17C1267600B6F81D 90 | 91 | isa 92 | PBXSourcesBuildPhase 93 | runOnlyForDeploymentPostprocessing 94 | 0 95 | 96 | 08A783EC17C1267600B6F81D 97 | 98 | buildActionMask 99 | 2147483647 100 | files 101 | 102 | 08A783F317C1267600B6F81D 103 | 08A783F517C1267600B6F81D 104 | 08A783F717C1267600B6F81D 105 | F74B7CEBFCE50EBDB6101A5D 106 | 107 | isa 108 | PBXFrameworksBuildPhase 109 | runOnlyForDeploymentPostprocessing 110 | 0 111 | 112 | 08A783ED17C1267600B6F81D 113 | 114 | buildActionMask 115 | 2147483647 116 | files 117 | 118 | 08A783FD17C1267600B6F81D 119 | 08A7840517C1267600B6F81D 120 | 08A7840717C1267600B6F81D 121 | 08A7840917C1267600B6F81D 122 | 08A7840F17C1267600B6F81D 123 | 124 | isa 125 | PBXResourcesBuildPhase 126 | runOnlyForDeploymentPostprocessing 127 | 0 128 | 129 | 08A783EE17C1267600B6F81D 130 | 131 | buildConfigurationList 132 | 08A7841217C1267600B6F81D 133 | buildPhases 134 | 135 | 1DD15024E3274049B8E6CD61 136 | 08A783EB17C1267600B6F81D 137 | 08A783EC17C1267600B6F81D 138 | 08A783ED17C1267600B6F81D 139 | 73780E85E07147FABE5A783D 140 | 141 | buildRules 142 | 143 | dependencies 144 | 145 | isa 146 | PBXNativeTarget 147 | name 148 | ICTutorialOverlayDemo 149 | productName 150 | ICTutorialOverlayDemo 151 | productReference 152 | 08A783EF17C1267600B6F81D 153 | productType 154 | com.apple.product-type.application 155 | 156 | 08A783EF17C1267600B6F81D 157 | 158 | explicitFileType 159 | wrapper.application 160 | includeInIndex 161 | 0 162 | isa 163 | PBXFileReference 164 | path 165 | ICTutorialOverlayDemo.app 166 | sourceTree 167 | BUILT_PRODUCTS_DIR 168 | 169 | 08A783F017C1267600B6F81D 170 | 171 | children 172 | 173 | 08A783EF17C1267600B6F81D 174 | 175 | isa 176 | PBXGroup 177 | name 178 | Products 179 | sourceTree 180 | <group> 181 | 182 | 08A783F117C1267600B6F81D 183 | 184 | children 185 | 186 | 08A783F217C1267600B6F81D 187 | 08A783F417C1267600B6F81D 188 | 08A783F617C1267600B6F81D 189 | DFF768628C4A1C89A720B8F2 190 | 191 | isa 192 | PBXGroup 193 | name 194 | Frameworks 195 | sourceTree 196 | <group> 197 | 198 | 08A783F217C1267600B6F81D 199 | 200 | isa 201 | PBXFileReference 202 | lastKnownFileType 203 | wrapper.framework 204 | name 205 | UIKit.framework 206 | path 207 | System/Library/Frameworks/UIKit.framework 208 | sourceTree 209 | SDKROOT 210 | 211 | 08A783F317C1267600B6F81D 212 | 213 | fileRef 214 | 08A783F217C1267600B6F81D 215 | isa 216 | PBXBuildFile 217 | 218 | 08A783F417C1267600B6F81D 219 | 220 | isa 221 | PBXFileReference 222 | lastKnownFileType 223 | wrapper.framework 224 | name 225 | Foundation.framework 226 | path 227 | System/Library/Frameworks/Foundation.framework 228 | sourceTree 229 | SDKROOT 230 | 231 | 08A783F517C1267600B6F81D 232 | 233 | fileRef 234 | 08A783F417C1267600B6F81D 235 | isa 236 | PBXBuildFile 237 | 238 | 08A783F617C1267600B6F81D 239 | 240 | isa 241 | PBXFileReference 242 | lastKnownFileType 243 | wrapper.framework 244 | name 245 | CoreGraphics.framework 246 | path 247 | System/Library/Frameworks/CoreGraphics.framework 248 | sourceTree 249 | SDKROOT 250 | 251 | 08A783F717C1267600B6F81D 252 | 253 | fileRef 254 | 08A783F617C1267600B6F81D 255 | isa 256 | PBXBuildFile 257 | 258 | 08A783F817C1267600B6F81D 259 | 260 | children 261 | 262 | 08A7840117C1267600B6F81D 263 | 08A7840217C1267600B6F81D 264 | 08A7840A17C1267600B6F81D 265 | 08A7840B17C1267600B6F81D 266 | 08A7840D17C1267600B6F81D 267 | 08A783F917C1267600B6F81D 268 | 269 | isa 270 | PBXGroup 271 | path 272 | ICTutorialOverlayDemo 273 | sourceTree 274 | <group> 275 | 276 | 08A783F917C1267600B6F81D 277 | 278 | children 279 | 280 | 08A783FA17C1267600B6F81D 281 | 08A783FB17C1267600B6F81D 282 | 08A783FE17C1267600B6F81D 283 | 08A7840017C1267600B6F81D 284 | 08A7840417C1267600B6F81D 285 | 08A7840617C1267600B6F81D 286 | 08A7840817C1267600B6F81D 287 | 288 | isa 289 | PBXGroup 290 | name 291 | Supporting Files 292 | sourceTree 293 | <group> 294 | 295 | 08A783FA17C1267600B6F81D 296 | 297 | isa 298 | PBXFileReference 299 | lastKnownFileType 300 | text.plist.xml 301 | path 302 | ICTutorialOverlayDemo-Info.plist 303 | sourceTree 304 | <group> 305 | 306 | 08A783FB17C1267600B6F81D 307 | 308 | children 309 | 310 | 08A783FC17C1267600B6F81D 311 | 312 | isa 313 | PBXVariantGroup 314 | name 315 | InfoPlist.strings 316 | sourceTree 317 | <group> 318 | 319 | 08A783FC17C1267600B6F81D 320 | 321 | isa 322 | PBXFileReference 323 | lastKnownFileType 324 | text.plist.strings 325 | name 326 | en 327 | path 328 | en.lproj/InfoPlist.strings 329 | sourceTree 330 | <group> 331 | 332 | 08A783FD17C1267600B6F81D 333 | 334 | fileRef 335 | 08A783FB17C1267600B6F81D 336 | isa 337 | PBXBuildFile 338 | 339 | 08A783FE17C1267600B6F81D 340 | 341 | isa 342 | PBXFileReference 343 | lastKnownFileType 344 | sourcecode.c.objc 345 | path 346 | main.m 347 | sourceTree 348 | <group> 349 | 350 | 08A783FF17C1267600B6F81D 351 | 352 | fileRef 353 | 08A783FE17C1267600B6F81D 354 | isa 355 | PBXBuildFile 356 | 357 | 08A7840017C1267600B6F81D 358 | 359 | isa 360 | PBXFileReference 361 | lastKnownFileType 362 | sourcecode.c.h 363 | path 364 | ICTutorialOverlayDemo-Prefix.pch 365 | sourceTree 366 | <group> 367 | 368 | 08A7840117C1267600B6F81D 369 | 370 | isa 371 | PBXFileReference 372 | lastKnownFileType 373 | sourcecode.c.h 374 | path 375 | ICAppDelegate.h 376 | sourceTree 377 | <group> 378 | 379 | 08A7840217C1267600B6F81D 380 | 381 | isa 382 | PBXFileReference 383 | lastKnownFileType 384 | sourcecode.c.objc 385 | path 386 | ICAppDelegate.m 387 | sourceTree 388 | <group> 389 | 390 | 08A7840317C1267600B6F81D 391 | 392 | fileRef 393 | 08A7840217C1267600B6F81D 394 | isa 395 | PBXBuildFile 396 | 397 | 08A7840417C1267600B6F81D 398 | 399 | isa 400 | PBXFileReference 401 | lastKnownFileType 402 | image.png 403 | path 404 | Default.png 405 | sourceTree 406 | <group> 407 | 408 | 08A7840517C1267600B6F81D 409 | 410 | fileRef 411 | 08A7840417C1267600B6F81D 412 | isa 413 | PBXBuildFile 414 | 415 | 08A7840617C1267600B6F81D 416 | 417 | isa 418 | PBXFileReference 419 | lastKnownFileType 420 | image.png 421 | path 422 | Default@2x.png 423 | sourceTree 424 | <group> 425 | 426 | 08A7840717C1267600B6F81D 427 | 428 | fileRef 429 | 08A7840617C1267600B6F81D 430 | isa 431 | PBXBuildFile 432 | 433 | 08A7840817C1267600B6F81D 434 | 435 | isa 436 | PBXFileReference 437 | lastKnownFileType 438 | image.png 439 | path 440 | Default-568h@2x.png 441 | sourceTree 442 | <group> 443 | 444 | 08A7840917C1267600B6F81D 445 | 446 | fileRef 447 | 08A7840817C1267600B6F81D 448 | isa 449 | PBXBuildFile 450 | 451 | 08A7840A17C1267600B6F81D 452 | 453 | isa 454 | PBXFileReference 455 | lastKnownFileType 456 | sourcecode.c.h 457 | path 458 | ICViewController.h 459 | sourceTree 460 | <group> 461 | 462 | 08A7840B17C1267600B6F81D 463 | 464 | isa 465 | PBXFileReference 466 | lastKnownFileType 467 | sourcecode.c.objc 468 | path 469 | ICViewController.m 470 | sourceTree 471 | <group> 472 | 473 | 08A7840C17C1267600B6F81D 474 | 475 | fileRef 476 | 08A7840B17C1267600B6F81D 477 | isa 478 | PBXBuildFile 479 | 480 | 08A7840D17C1267600B6F81D 481 | 482 | children 483 | 484 | 08A7840E17C1267600B6F81D 485 | 486 | isa 487 | PBXVariantGroup 488 | name 489 | ICViewController.xib 490 | sourceTree 491 | <group> 492 | 493 | 08A7840E17C1267600B6F81D 494 | 495 | isa 496 | PBXFileReference 497 | lastKnownFileType 498 | file.xib 499 | name 500 | en 501 | path 502 | en.lproj/ICViewController.xib 503 | sourceTree 504 | <group> 505 | 506 | 08A7840F17C1267600B6F81D 507 | 508 | fileRef 509 | 08A7840D17C1267600B6F81D 510 | isa 511 | PBXBuildFile 512 | 513 | 08A7841017C1267600B6F81D 514 | 515 | buildSettings 516 | 517 | ALWAYS_SEARCH_USER_PATHS 518 | NO 519 | CLANG_CXX_LANGUAGE_STANDARD 520 | gnu++0x 521 | CLANG_CXX_LIBRARY 522 | libc++ 523 | CLANG_ENABLE_OBJC_ARC 524 | YES 525 | CLANG_WARN_CONSTANT_CONVERSION 526 | YES 527 | CLANG_WARN_EMPTY_BODY 528 | YES 529 | CLANG_WARN_ENUM_CONVERSION 530 | YES 531 | CLANG_WARN_INT_CONVERSION 532 | YES 533 | CLANG_WARN__DUPLICATE_METHOD_MATCH 534 | YES 535 | CODE_SIGN_IDENTITY[sdk=iphoneos*] 536 | iPhone Developer 537 | COPY_PHASE_STRIP 538 | NO 539 | GCC_C_LANGUAGE_STANDARD 540 | gnu99 541 | GCC_DYNAMIC_NO_PIC 542 | NO 543 | GCC_OPTIMIZATION_LEVEL 544 | 0 545 | GCC_PREPROCESSOR_DEFINITIONS 546 | 547 | DEBUG=1 548 | $(inherited) 549 | 550 | GCC_SYMBOLS_PRIVATE_EXTERN 551 | NO 552 | GCC_WARN_ABOUT_RETURN_TYPE 553 | YES 554 | GCC_WARN_UNINITIALIZED_AUTOS 555 | YES 556 | GCC_WARN_UNUSED_VARIABLE 557 | YES 558 | IPHONEOS_DEPLOYMENT_TARGET 559 | 6.1 560 | ONLY_ACTIVE_ARCH 561 | YES 562 | SDKROOT 563 | iphoneos 564 | 565 | isa 566 | XCBuildConfiguration 567 | name 568 | Debug 569 | 570 | 08A7841117C1267600B6F81D 571 | 572 | buildSettings 573 | 574 | ALWAYS_SEARCH_USER_PATHS 575 | NO 576 | CLANG_CXX_LANGUAGE_STANDARD 577 | gnu++0x 578 | CLANG_CXX_LIBRARY 579 | libc++ 580 | CLANG_ENABLE_OBJC_ARC 581 | YES 582 | CLANG_WARN_CONSTANT_CONVERSION 583 | YES 584 | CLANG_WARN_EMPTY_BODY 585 | YES 586 | CLANG_WARN_ENUM_CONVERSION 587 | YES 588 | CLANG_WARN_INT_CONVERSION 589 | YES 590 | CLANG_WARN__DUPLICATE_METHOD_MATCH 591 | YES 592 | CODE_SIGN_IDENTITY[sdk=iphoneos*] 593 | iPhone Developer 594 | COPY_PHASE_STRIP 595 | YES 596 | GCC_C_LANGUAGE_STANDARD 597 | gnu99 598 | GCC_WARN_ABOUT_RETURN_TYPE 599 | YES 600 | GCC_WARN_UNINITIALIZED_AUTOS 601 | YES 602 | GCC_WARN_UNUSED_VARIABLE 603 | YES 604 | IPHONEOS_DEPLOYMENT_TARGET 605 | 6.1 606 | OTHER_CFLAGS 607 | -DNS_BLOCK_ASSERTIONS=1 608 | SDKROOT 609 | iphoneos 610 | VALIDATE_PRODUCT 611 | YES 612 | 613 | isa 614 | XCBuildConfiguration 615 | name 616 | Release 617 | 618 | 08A7841217C1267600B6F81D 619 | 620 | buildConfigurations 621 | 622 | 08A7841317C1267600B6F81D 623 | 08A7841417C1267600B6F81D 624 | 625 | defaultConfigurationIsVisible 626 | 0 627 | defaultConfigurationName 628 | Release 629 | isa 630 | XCConfigurationList 631 | 632 | 08A7841317C1267600B6F81D 633 | 634 | baseConfigurationReference 635 | AF053C10E33E206EB71AAF59 636 | buildSettings 637 | 638 | GCC_PRECOMPILE_PREFIX_HEADER 639 | YES 640 | GCC_PREFIX_HEADER 641 | ICTutorialOverlayDemo/ICTutorialOverlayDemo-Prefix.pch 642 | INFOPLIST_FILE 643 | ICTutorialOverlayDemo/ICTutorialOverlayDemo-Info.plist 644 | PRODUCT_NAME 645 | $(TARGET_NAME) 646 | WRAPPER_EXTENSION 647 | app 648 | 649 | isa 650 | XCBuildConfiguration 651 | name 652 | Debug 653 | 654 | 08A7841417C1267600B6F81D 655 | 656 | baseConfigurationReference 657 | 36DAC8919815D73AD8737EB2 658 | buildSettings 659 | 660 | GCC_PRECOMPILE_PREFIX_HEADER 661 | YES 662 | GCC_PREFIX_HEADER 663 | ICTutorialOverlayDemo/ICTutorialOverlayDemo-Prefix.pch 664 | INFOPLIST_FILE 665 | ICTutorialOverlayDemo/ICTutorialOverlayDemo-Info.plist 666 | PRODUCT_NAME 667 | $(TARGET_NAME) 668 | WRAPPER_EXTENSION 669 | app 670 | 671 | isa 672 | XCBuildConfiguration 673 | name 674 | Release 675 | 676 | 1DD15024E3274049B8E6CD61 677 | 678 | buildActionMask 679 | 2147483647 680 | files 681 | 682 | inputPaths 683 | 684 | isa 685 | PBXShellScriptBuildPhase 686 | name 687 | Check Pods Manifest.lock 688 | outputPaths 689 | 690 | runOnlyForDeploymentPostprocessing 691 | 0 692 | shellPath 693 | /bin/sh 694 | shellScript 695 | diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null 696 | if [[ $? != 0 ]] ; then 697 | cat << EOM 698 | error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. 699 | EOM 700 | exit 1 701 | fi 702 | 703 | 704 | 36DAC8919815D73AD8737EB2 705 | 706 | includeInIndex 707 | 1 708 | isa 709 | PBXFileReference 710 | lastKnownFileType 711 | text.xcconfig 712 | name 713 | Pods.release.xcconfig 714 | path 715 | Pods/Target Support Files/Pods/Pods.release.xcconfig 716 | sourceTree 717 | <group> 718 | 719 | 70B1D830EE4A25D6074883F0 720 | 721 | children 722 | 723 | AF053C10E33E206EB71AAF59 724 | 36DAC8919815D73AD8737EB2 725 | 726 | isa 727 | PBXGroup 728 | name 729 | Pods 730 | sourceTree 731 | <group> 732 | 733 | 73780E85E07147FABE5A783D 734 | 735 | buildActionMask 736 | 2147483647 737 | files 738 | 739 | inputPaths 740 | 741 | isa 742 | PBXShellScriptBuildPhase 743 | name 744 | Copy Pods Resources 745 | outputPaths 746 | 747 | runOnlyForDeploymentPostprocessing 748 | 0 749 | shellPath 750 | /bin/sh 751 | shellScript 752 | "${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh" 753 | 754 | showEnvVarsInLog 755 | 0 756 | 757 | AF053C10E33E206EB71AAF59 758 | 759 | includeInIndex 760 | 1 761 | isa 762 | PBXFileReference 763 | lastKnownFileType 764 | text.xcconfig 765 | name 766 | Pods.debug.xcconfig 767 | path 768 | Pods/Target Support Files/Pods/Pods.debug.xcconfig 769 | sourceTree 770 | <group> 771 | 772 | DFF768628C4A1C89A720B8F2 773 | 774 | explicitFileType 775 | archive.ar 776 | includeInIndex 777 | 0 778 | isa 779 | PBXFileReference 780 | path 781 | libPods.a 782 | sourceTree 783 | BUILT_PRODUCTS_DIR 784 | 785 | F74B7CEBFCE50EBDB6101A5D 786 | 787 | fileRef 788 | DFF768628C4A1C89A720B8F2 789 | isa 790 | PBXBuildFile 791 | 792 | 793 | rootObject 794 | 08A783E717C1267600B6F81D 795 | 796 | 797 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/ICTutorialOverlayDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/ICTutorialOverlayDemo.xcodeproj/project.xcworkspace/xcshareddata/ICTutorialOverlayDemo.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | A74330EA-29D3-4AE8-AF11-B6A34C13478D 9 | IDESourceControlProjectName 10 | ICTutorialOverlayDemo 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 7DBD0DD5A557C5839CEC182E147EA2CF63452CB5 14 | https://github.com/djbrooks111/ICTutorialOverlay.git 15 | 16 | IDESourceControlProjectPath 17 | ICTutorialOverlayDemo/ICTutorialOverlayDemo.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 7DBD0DD5A557C5839CEC182E147EA2CF63452CB5 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/djbrooks111/ICTutorialOverlay.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 7DBD0DD5A557C5839CEC182E147EA2CF63452CB5 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 7DBD0DD5A557C5839CEC182E147EA2CF63452CB5 36 | IDESourceControlWCCName 37 | ICTutorialOverlay 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/ICTutorialOverlayDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/ICTutorialOverlayDemo.xcworkspace/xcshareddata/ICTutorialOverlayDemo.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 694254E4-09A4-4497-B9A4-05701A60B5F2 9 | IDESourceControlProjectName 10 | ICTutorialOverlayDemo 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 7DBD0DD5A557C5839CEC182E147EA2CF63452CB5 14 | https://github.com/djbrooks111/ICTutorialOverlay.git 15 | 16 | IDESourceControlProjectPath 17 | ICTutorialOverlayDemo/ICTutorialOverlayDemo.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 7DBD0DD5A557C5839CEC182E147EA2CF63452CB5 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/djbrooks111/ICTutorialOverlay.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 7DBD0DD5A557C5839CEC182E147EA2CF63452CB5 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 7DBD0DD5A557C5839CEC182E147EA2CF63452CB5 36 | IDESourceControlWCCName 37 | ICTutorialOverlay 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/ICTutorialOverlayDemo/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/i110/ICTutorialOverlay/96993833fa871e15cf96260da4248d153b863c9e/ICTutorialOverlayDemo/ICTutorialOverlayDemo/Default-568h@2x.png -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/ICTutorialOverlayDemo/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/i110/ICTutorialOverlay/96993833fa871e15cf96260da4248d153b863c9e/ICTutorialOverlayDemo/ICTutorialOverlayDemo/Default.png -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/ICTutorialOverlayDemo/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/i110/ICTutorialOverlay/96993833fa871e15cf96260da4248d153b863c9e/ICTutorialOverlayDemo/ICTutorialOverlayDemo/Default@2x.png -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/ICTutorialOverlayDemo/ICAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ICAppDelegate.h 3 | // ICTutorialOverlayDemo 4 | // 5 | // Created by Ichito Nagata on 2013/08/19. 6 | // Copyright (c) 2013年 Ichito Nagata. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ICViewController; 12 | 13 | @interface ICAppDelegate : UIResponder 14 | 15 | @property (strong, nonatomic) UIWindow *window; 16 | 17 | @property (strong, nonatomic) ICViewController *viewController; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/ICTutorialOverlayDemo/ICAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // ICAppDelegate.m 3 | // ICTutorialOverlayDemo 4 | // 5 | // Created by Ichito Nagata on 2013/08/19. 6 | // Copyright (c) 2013年 Ichito Nagata. All rights reserved. 7 | // 8 | 9 | #import "ICAppDelegate.h" 10 | 11 | #import "ICViewController.h" 12 | 13 | @implementation ICAppDelegate 14 | 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 16 | { 17 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 18 | // Override point for customization after application launch. 19 | self.viewController = [[ICViewController alloc] initWithNibName:@"ICViewController" bundle:nil]; 20 | self.window.rootViewController = self.viewController; 21 | [self.window makeKeyAndVisible]; 22 | return YES; 23 | } 24 | 25 | - (void)applicationWillResignActive:(UIApplication *)application 26 | { 27 | // 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. 28 | // 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. 29 | } 30 | 31 | - (void)applicationDidEnterBackground:(UIApplication *)application 32 | { 33 | // 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. 34 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 35 | } 36 | 37 | - (void)applicationWillEnterForeground:(UIApplication *)application 38 | { 39 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 40 | } 41 | 42 | - (void)applicationDidBecomeActive:(UIApplication *)application 43 | { 44 | // 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. 45 | } 46 | 47 | - (void)applicationWillTerminate:(UIApplication *)application 48 | { 49 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/ICTutorialOverlayDemo/ICTutorialOverlayDemo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | jp.pgw.ixrs.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/ICTutorialOverlayDemo/ICTutorialOverlayDemo-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'ICTutorialOverlayDemo' target in the 'ICTutorialOverlayDemo' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_4_0 8 | #warning "This project uses features only available in iOS SDK 4.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/ICTutorialOverlayDemo/ICViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ICViewController.h 3 | // ICTutorialOverlayDemo 4 | // 5 | // Created by Ichito Nagata on 2013/08/19. 6 | // Copyright (c) 2013年 Ichito Nagata. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "ICTutorialOverlay.h" 12 | 13 | @interface ICViewController : UIViewController 14 | 15 | @property (nonatomic, weak) IBOutlet UIButton *rectButton; 16 | @property (nonatomic, weak) IBOutlet UIButton *roundRectButton; 17 | @property (nonatomic, weak) IBOutlet UIButton *circleButton; 18 | @property (nonatomic, weak) IBOutlet UIButton *randomButton; 19 | 20 | - (IBAction)didRectButtonTapped:(id)sender; 21 | - (IBAction)didRoundRectButtonTapped:(id)sender; 22 | - (IBAction)didCircleButtonTapped:(id)sender; 23 | - (IBAction)didRandomButtonTapped:(id)sender; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/ICTutorialOverlayDemo/ICViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ICViewController.m 3 | // ICTutorialOverlayDemo 4 | // 5 | // Created by Ichito Nagata on 2013/08/19. 6 | // Copyright (c) 2013年 Ichito Nagata. All rights reserved. 7 | // 8 | 9 | #import "ICViewController.h" 10 | 11 | @interface ICViewController () 12 | { 13 | ICTutorialOverlay *overlay; 14 | } 15 | @end 16 | 17 | @implementation ICViewController 18 | 19 | - (void)viewDidLoad 20 | { 21 | [super viewDidLoad]; 22 | srand([[NSDate date] timeIntervalSinceReferenceDate]); 23 | } 24 | 25 | - (IBAction)didRectButtonTapped:(id)sender 26 | { 27 | overlay = [[ICTutorialOverlay alloc] init]; 28 | overlay.animated = YES; 29 | overlay.hideWhenTapped = NO; 30 | [overlay addHoleWithView:self.rectButton padding:4.0f offset:CGSizeZero form:ICTutorialOverlayHoleFormRectangle transparentEvent:NO]; 31 | 32 | // when using callbacks, you must use weak reference to avoid circular reference 33 | __weak ICViewController *weakSelf = self; 34 | overlay.willShowCallback = ^{ 35 | NSLog(@"willShowCallback invoked by %@", NSStringFromClass(weakSelf.class)); 36 | }; 37 | overlay.didShowCallback = ^{ 38 | NSLog(@"didShowCallback invoked by %@", NSStringFromClass(weakSelf.class)); 39 | }; 40 | overlay.willHideCallback = ^{ 41 | NSLog(@"willHideCallback invoked by %@", NSStringFromClass(weakSelf.class)); 42 | }; 43 | overlay.didHideCallback = ^{ 44 | NSLog(@"didHideCallback invoked by %@", NSStringFromClass(weakSelf.class)); 45 | }; 46 | 47 | UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(20, 300, 300, 50)]; 48 | label.backgroundColor = [UIColor clearColor]; 49 | label.textColor = [UIColor whiteColor]; 50 | label.numberOfLines = 0; 51 | label.text = @"You can add any subviews into overlay.\nThis will not disappear when tapped"; 52 | [overlay addSubview:label]; 53 | 54 | UIButton *closeButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; 55 | [closeButton setTitle:@"Close" forState:UIControlStateNormal]; 56 | closeButton.frame = CGRectMake(20, 350, 80, 40); 57 | [closeButton addTarget:self action:@selector(didCloseButtonTapped:) forControlEvents:UIControlEventTouchUpInside]; 58 | [overlay addSubview:closeButton]; 59 | 60 | [overlay show]; 61 | } 62 | 63 | - (IBAction)didRoundRectButtonTapped:(id)sender 64 | { 65 | if (overlay && overlay.isShown) { 66 | [overlay hide]; 67 | return; 68 | } 69 | 70 | overlay = [[ICTutorialOverlay alloc] init]; 71 | overlay.hideWhenTapped = NO; 72 | overlay.animated = YES; 73 | [overlay addHoleWithView:self.roundRectButton padding:8.0f offset:CGSizeZero form:ICTutorialOverlayHoleFormRoundedRectangle transparentEvent:YES]; 74 | 75 | 76 | UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(100, 170, 220, 150)]; 77 | label.backgroundColor = [UIColor clearColor]; 78 | label.textColor = [UIColor whiteColor]; 79 | label.numberOfLines = 0; 80 | label.text = @"You can tap views beneath this overlay using transparentEvent:YES.\nTap once again to close."; 81 | [overlay addSubview:label]; 82 | 83 | [overlay show]; 84 | } 85 | 86 | - (void)didCloseButtonTapped:(id)sender 87 | { 88 | [overlay hide]; 89 | } 90 | 91 | - (IBAction)didCircleButtonTapped:(id)sender 92 | { 93 | if (overlay && overlay.isShown) { 94 | [[[UIAlertView alloc] initWithTitle:nil message:@"You are already showing overlay!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil] show]; 95 | return; 96 | } 97 | 98 | overlay = [[ICTutorialOverlay alloc] init]; 99 | overlay.hideWhenTapped = NO; 100 | [overlay addHoleWithView:self.circleButton padding:24.0f offset:CGSizeZero form:ICTutorialOverlayHoleFormCircle transparentEvent:YES]; 101 | 102 | UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(20, 300, 300, 80)]; 103 | label.backgroundColor = [UIColor clearColor]; 104 | label.textColor = [UIColor whiteColor]; 105 | label.numberOfLines = 0; 106 | label.text = @"If you add a hole using view, ignore events which happen at outside of the view. i.e. You can't tap other buttons."; 107 | [overlay addSubview:label]; 108 | 109 | UIButton *closeButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; 110 | [closeButton setTitle:@"Close" forState:UIControlStateNormal]; 111 | closeButton.frame = CGRectMake(20, 370, 80, 40); 112 | [closeButton addTarget:self action:@selector(didCloseButtonTapped:) forControlEvents:UIControlEventTouchUpInside]; 113 | [overlay addSubview:closeButton]; 114 | 115 | [overlay show]; 116 | } 117 | 118 | - (IBAction)didRandomButtonTapped:(id)sender 119 | { 120 | CGRect rect = CGRectMake((CGFloat)rand() / RAND_MAX * 300, (CGFloat)rand() / RAND_MAX * 300, 100, 100); 121 | 122 | overlay = [[ICTutorialOverlay alloc] init]; 123 | overlay.hideWhenTapped = YES; 124 | [overlay addHoleWithRect:rect form:ICTutorialOverlayHoleFormCircle transparentEvent:NO]; 125 | [overlay show]; 126 | } 127 | 128 | # pragma mark - 129 | # pragma mark helper 130 | 131 | - (void)showAlert:(NSString*)message 132 | { 133 | [[[UIAlertView alloc] initWithTitle:nil message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; 134 | } 135 | 136 | @end 137 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/ICTutorialOverlayDemo/en.lproj/ICViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 33 | 44 | 55 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/ICTutorialOverlayDemo/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/ICTutorialOverlayDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ICTutorialOverlayDemo 4 | // 5 | // Created by Ichito Nagata on 2013/08/19. 6 | // Copyright (c) 2013年 Ichito Nagata. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "ICAppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([ICAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | platform :ios, "8.0" 4 | 5 | pod 'ICTutorialOverlay' -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ICTutorialOverlay (0.0.6) 3 | 4 | DEPENDENCIES: 5 | - ICTutorialOverlay 6 | 7 | SPEC CHECKSUMS: 8 | ICTutorialOverlay: 9ea88e32698a90a55d62c089712498184a11a9c3 9 | 10 | COCOAPODS: 0.35.0 11 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Pods/Headers/Public/ICTutorialOverlay/ICTutorialOverlay.h: -------------------------------------------------------------------------------- 1 | ../../../ICTutorialOverlay/ICTutorialOverlay/Classes/ICTutorialOverlay.h -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Pods/ICTutorialOverlay/ICTutorialOverlay/Classes/ICTutorialOverlay.h: -------------------------------------------------------------------------------- 1 | // 2 | // ICTutorialOverlay.h 3 | // ICTutorialOverlay 4 | // 5 | // Created by Ichito Nagata on 2013/08/19. 6 | // 7 | // 8 | 9 | #import 10 | 11 | typedef enum { 12 | ICTutorialOverlayHoleFormRectangle = 0, 13 | ICTutorialOverlayHoleFormCircle = 1, 14 | ICTutorialOverlayHoleFormRoundedRectangle = 2, 15 | } ICTutorialOverlayHoleForm; 16 | 17 | @interface ICTutorialOverlayHole : NSObject 18 | 19 | @property (nonatomic) CGRect rect; 20 | @property (nonatomic) ICTutorialOverlayHoleForm form; 21 | @property (nonatomic) BOOL transparentEvent; 22 | @property (nonatomic) UIView *boundView; 23 | 24 | - (UIBezierPath*)bezierPath; 25 | - (BOOL)containsPoint:(CGPoint)point; 26 | 27 | @end 28 | 29 | @interface ICTutorialOverlay : UIView 30 | 31 | @property (nonatomic) BOOL animated; 32 | @property (nonatomic) BOOL hideWhenTapped; 33 | @property (nonatomic, copy) void(^willShowCallback)(); 34 | @property (nonatomic, copy) void(^didShowCallback)(); 35 | @property (nonatomic, copy) void(^willHideCallback)(); 36 | @property (nonatomic, copy) void(^didHideCallback)(); 37 | @property (nonatomic, readonly) BOOL isShown; 38 | 39 | - (ICTutorialOverlayHole*)addHoleWithRect:(CGRect)rect form:(ICTutorialOverlayHoleForm)form transparentEvent:(BOOL)transparentEvent; 40 | - (ICTutorialOverlayHole*)addHoleWithView:(UIView*)view padding:(CGFloat)padding offset:(CGSize)offset form:(ICTutorialOverlayHoleForm)form transparentEvent:(BOOL)transparentEvent; 41 | 42 | - (void)show; 43 | - (void)hide; 44 | 45 | + (ICTutorialOverlay*)showingOverlay; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Pods/ICTutorialOverlay/ICTutorialOverlay/Classes/ICTutorialOverlay.m: -------------------------------------------------------------------------------- 1 | // 2 | // ICTutorialOverlay.m 3 | // ICTutorialOverlay 4 | // 5 | // Created by Ichito Nagata on 2013/08/19. 6 | // 7 | // 8 | 9 | #define ANIMATION_DURATION 0.4f 10 | 11 | #import "ICTutorialOverlay.h" 12 | 13 | #import 14 | 15 | #pragma mark - 16 | #pragma mark ICTutorialOverlayHole 17 | 18 | @implementation ICTutorialOverlayHole 19 | 20 | - (UIBezierPath*)bezierPath 21 | { 22 | UIBezierPath *path; 23 | switch (self.form) { 24 | case ICTutorialOverlayHoleFormRectangle: 25 | path = [UIBezierPath bezierPathWithRect:self.rect]; 26 | break; 27 | case ICTutorialOverlayHoleFormCircle: 28 | path = [UIBezierPath bezierPathWithOvalInRect:self.rect]; 29 | break; 30 | case ICTutorialOverlayHoleFormRoundedRectangle: 31 | path = [UIBezierPath bezierPathWithRoundedRect:self.rect cornerRadius:7.0f]; 32 | break; 33 | default: 34 | break; 35 | } 36 | return path; 37 | } 38 | 39 | - (BOOL)containsPoint:(CGPoint)point 40 | { 41 | if (self.boundView) { 42 | UIView *rootView = self.boundView; 43 | while (rootView.superview) { 44 | rootView = rootView.superview; 45 | } 46 | CGRect rect = [self.boundView convertRect:self.boundView.bounds toView:rootView]; 47 | return CGRectContainsPoint(rect, point); 48 | } 49 | 50 | UIBezierPath *path = [self bezierPath]; 51 | if (path == nil) { 52 | return YES; 53 | } 54 | return [path containsPoint:point]; 55 | } 56 | 57 | @end 58 | 59 | #pragma mark - 60 | #pragma mark ICTutorialOverlay 61 | 62 | @interface ICTutorialOverlay () 63 | { 64 | NSMutableArray *holes; 65 | } 66 | @end 67 | 68 | @implementation ICTutorialOverlay 69 | 70 | static ICTutorialOverlay *showingOverlay; 71 | + (ICTutorialOverlay*)showingOverlay 72 | { 73 | return showingOverlay; 74 | } 75 | 76 | - (void)initialize 77 | { 78 | holes = [NSMutableArray array]; 79 | self.opaque = NO; 80 | self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.3]; 81 | self.hideWhenTapped = NO; 82 | } 83 | 84 | - (id)initWithFrame:(CGRect)frame 85 | { 86 | self = [super initWithFrame:frame]; 87 | if (self) { 88 | [self initialize]; 89 | 90 | } 91 | return self; 92 | } 93 | 94 | - (id)initWithCoder:(NSCoder *)aDecoder 95 | { 96 | self = [super initWithCoder:aDecoder]; 97 | if (self) { 98 | [self initialize]; 99 | } 100 | return self; 101 | } 102 | 103 | - (ICTutorialOverlayHole*)addHoleWithRect:(CGRect)rect form:(ICTutorialOverlayHoleForm)form transparentEvent:(BOOL)transparentEvent 104 | { 105 | ICTutorialOverlayHole *hole = [[ICTutorialOverlayHole alloc] init]; 106 | hole.rect = rect; 107 | hole.form = form; 108 | hole.transparentEvent = transparentEvent; 109 | [holes addObject:hole]; 110 | return hole; 111 | } 112 | 113 | - (ICTutorialOverlayHole*)addHoleWithView:(UIView*)view padding:(CGFloat)padding offset:(CGSize)offset form:(ICTutorialOverlayHoleForm)form transparentEvent:(BOOL)transparentEvent 114 | { 115 | UIView *rootView = view; 116 | while (rootView.superview) { 117 | rootView = rootView.superview; 118 | } 119 | CGRect rect = [view convertRect:view.bounds toView:rootView]; 120 | 121 | CGSize paddingSize = [self calculatePaddingSizeWithRect:rect defaultPadding:padding form:form]; 122 | rect.origin.x += offset.width - paddingSize.width; 123 | rect.origin.y += offset.height - paddingSize.height; 124 | rect.size.width += paddingSize.width * 2; 125 | rect.size.height += paddingSize.height * 2; 126 | 127 | ICTutorialOverlayHole *hole = [self addHoleWithRect:rect form:form transparentEvent:transparentEvent]; 128 | hole.boundView = view; 129 | return hole; 130 | } 131 | 132 | - (CGSize)calculatePaddingSizeWithRect:(CGRect)rect defaultPadding:(CGFloat)defaultPadding form:(ICTutorialOverlayHoleForm)form 133 | { 134 | if (rect.size.width == 0 || rect.size.height == 0) { 135 | return CGSizeMake(defaultPadding, defaultPadding); 136 | } 137 | 138 | CGSize paddingSize; 139 | switch (form) { 140 | case ICTutorialOverlayHoleFormRectangle: 141 | case ICTutorialOverlayHoleFormRoundedRectangle: 142 | { 143 | paddingSize.width = defaultPadding; 144 | paddingSize.height = defaultPadding; 145 | break; 146 | } 147 | case ICTutorialOverlayHoleFormCircle: 148 | { 149 | CGFloat w = rect.size.width; 150 | CGFloat h = rect.size.height; 151 | CGFloat theta = atan2f(h, w); 152 | CGFloat sin = sinf(theta); 153 | CGFloat cos = cosf(theta); 154 | CGFloat coef = sqrtf(sin * sin + (h * h) / (w * w) * cos * cos); 155 | CGFloat cw = w * coef / sin; 156 | CGFloat ch = h * coef / sin; 157 | paddingSize.width = (cw - w) / 2 + defaultPadding; 158 | paddingSize.height = (ch - h) / 2 + defaultPadding; 159 | break; 160 | } 161 | default: 162 | break; 163 | } 164 | 165 | return paddingSize; 166 | } 167 | 168 | - (void)drawRect:(CGRect)rect 169 | { 170 | CGContextRef context = UIGraphicsGetCurrentContext(); 171 | CGContextSaveGState(context); 172 | 173 | CGContextSetFillColorWithColor(context, self.backgroundColor.CGColor); 174 | CGContextFillRect(context, rect); 175 | 176 | for (ICTutorialOverlayHole *hole in holes) { 177 | if(! CGRectIsEmpty(CGRectIntersection(hole.rect, rect))) { 178 | UIBezierPath *path = [hole bezierPath]; 179 | if (path) { 180 | [path fillWithBlendMode:kCGBlendModeClear alpha:1]; 181 | } 182 | } 183 | } 184 | 185 | CGContextRestoreGState(context); 186 | } 187 | 188 | 189 | - (void)show 190 | { 191 | if (self.isShown) { 192 | return; 193 | } 194 | 195 | if (showingOverlay) { 196 | [showingOverlay hide]; 197 | } 198 | 199 | showingOverlay = self; 200 | 201 | if (self.willShowCallback) { 202 | self.willShowCallback(); 203 | } 204 | 205 | UIWindow *window = [UIApplication sharedApplication].keyWindow; 206 | self.frame = window.bounds; 207 | [window addSubview:self]; 208 | [window bringSubviewToFront:self]; 209 | 210 | if (self.animated) { 211 | self.alpha = 0.0f; 212 | [UIView animateWithDuration:ANIMATION_DURATION animations:^{ 213 | self.alpha = 1.0f; 214 | } completion:^(BOOL finished) { 215 | if (finished) { 216 | if (self.didShowCallback) { 217 | self.didShowCallback(); 218 | } 219 | } 220 | }]; 221 | } else { 222 | if (self.didShowCallback) { 223 | self.didShowCallback(); 224 | } 225 | } 226 | 227 | } 228 | 229 | - (void)hide 230 | { 231 | if (! self.isShown) { 232 | return; 233 | } 234 | 235 | showingOverlay = nil; 236 | 237 | if (self.willHideCallback) { 238 | self.willHideCallback(); 239 | } 240 | 241 | if (self.animated) { 242 | self.alpha = 1.0f; 243 | [UIView animateWithDuration:ANIMATION_DURATION animations:^{ 244 | self.alpha = 0.0f; 245 | } completion:^(BOOL finished) { 246 | if (finished) { 247 | [self removeFromSuperview]; 248 | if (self.didHideCallback) { 249 | self.didHideCallback(); 250 | } 251 | } 252 | }]; 253 | } else { 254 | [self removeFromSuperview]; 255 | if (self.didHideCallback) { 256 | self.didHideCallback(); 257 | } 258 | } 259 | 260 | 261 | 262 | } 263 | 264 | - (BOOL)isShown 265 | { 266 | return self.superview != nil; 267 | } 268 | 269 | - (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event { 270 | 271 | for (ICTutorialOverlayHole *hole in holes) { 272 | if (! hole.transparentEvent) { 273 | continue; 274 | } 275 | if ([hole containsPoint:point]) { 276 | return NO; 277 | } 278 | } 279 | return YES; 280 | } 281 | 282 | - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event 283 | { 284 | if (self.hideWhenTapped) { 285 | [self hide]; 286 | } 287 | } 288 | 289 | @end 290 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Pods/ICTutorialOverlay/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Ichito Nagata 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Pods/ICTutorialOverlay/README.md: -------------------------------------------------------------------------------- 1 | # ICTutorialOverlay 2 | 3 | A utility for making "Overlay Tutorial" 4 | 5 | ## Adding ICTutorialOverlay to your project 6 | 7 | ### Cocoapods 8 | 9 | [CocoaPods](http://cocoapods.org) is the recommended way to add ICTutorialOverlay to your project. 10 | 11 | 1. Add ICTutorialOverlay to your Podfile `pod 'ICTutorialOverlay'`. 12 | 2. Install the pod(s) by running `pod install`. 13 | 3. Include ICTutorialOverlay to your files with `#import `. 14 | 15 | ### Clone from Github 16 | 17 | 1. Clone repository from github and copy files directly, or add it as a git submodule. 18 | 2. Add ICTutorialOverlay and RuntimeUtils (.h and .m) files to your project. 19 | 20 | ### Example Usage 21 | 22 | ```objective-c 23 | ICTutorialOverlay *overlay = [[ICTutorialOverlay alloc] init]; 24 | overlay.hideWhenTapped = NO; 25 | overlay.animated = YES; 26 | [overlay addHoleWithView:self.roundRectButton padding:8.0f offset:CGSizeZero form:ICTutorialOverlayHoleFormRoundedRectangle transparentEvent:YES]; 27 | 28 | 29 | UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(100, 170, 220, 150)]; 30 | label.backgroundColor = [UIColor clearColor]; 31 | label.textColor = [UIColor whiteColor]; 32 | label.numberOfLines = 0; 33 | label.text = @"You can place any views on the overlay"; 34 | [overlay addSubview:label]; 35 | 36 | [overlay show]; 37 | 38 | ## Suggestions, requests, feedback and acknowledgements 39 | 40 | Any feedback can be can be sent to: i.nagata110@gmail.com. 41 | 42 | This software is licensed under the MIT License. 43 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ICTutorialOverlay (0.0.6) 3 | 4 | DEPENDENCIES: 5 | - ICTutorialOverlay 6 | 7 | SPEC CHECKSUMS: 8 | ICTutorialOverlay: 9ea88e32698a90a55d62c089712498184a11a9c3 9 | 10 | COCOAPODS: 0.35.0 11 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | archiveVersion 6 | 1 7 | classes 8 | 9 | objectVersion 10 | 46 11 | objects 12 | 13 | 0764161B167A7178868A3B90 14 | 15 | isa 16 | PBXFileReference 17 | lastKnownFileType 18 | wrapper.framework 19 | name 20 | Foundation.framework 21 | path 22 | Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/Foundation.framework 23 | sourceTree 24 | DEVELOPER_DIR 25 | 26 | 108E8543D387EFFF752E0823 27 | 28 | fileRef 29 | 0764161B167A7178868A3B90 30 | isa 31 | PBXBuildFile 32 | 33 | 1301C7A6705BD261E265BD41 34 | 35 | baseConfigurationReference 36 | 8C736B80B3C7E9DA73C1C900 37 | buildSettings 38 | 39 | ALWAYS_SEARCH_USER_PATHS 40 | NO 41 | COPY_PHASE_STRIP 42 | NO 43 | DSTROOT 44 | /tmp/xcodeproj.dst 45 | GCC_DYNAMIC_NO_PIC 46 | NO 47 | GCC_OPTIMIZATION_LEVEL 48 | 0 49 | GCC_PRECOMPILE_PREFIX_HEADER 50 | YES 51 | GCC_PREPROCESSOR_DEFINITIONS 52 | 53 | DEBUG=1 54 | $(inherited) 55 | 56 | GCC_SYMBOLS_PRIVATE_EXTERN 57 | NO 58 | INSTALL_PATH 59 | $(BUILT_PRODUCTS_DIR) 60 | IPHONEOS_DEPLOYMENT_TARGET 61 | 8.0 62 | OTHER_LDFLAGS 63 | 64 | OTHER_LIBTOOLFLAGS 65 | 66 | PRODUCT_NAME 67 | $(TARGET_NAME) 68 | PUBLIC_HEADERS_FOLDER_PATH 69 | $(TARGET_NAME) 70 | SDKROOT 71 | iphoneos 72 | SKIP_INSTALL 73 | YES 74 | 75 | isa 76 | XCBuildConfiguration 77 | name 78 | Debug 79 | 80 | 14F825278500051036B03E82 81 | 82 | includeInIndex 83 | 1 84 | isa 85 | PBXFileReference 86 | lastKnownFileType 87 | text 88 | path 89 | Pods-acknowledgements.markdown 90 | sourceTree 91 | <group> 92 | 93 | 175D2187132D9C26D01BAE72 94 | 95 | baseConfigurationReference 96 | DFC06007DC6ADAD485725C9D 97 | buildSettings 98 | 99 | ALWAYS_SEARCH_USER_PATHS 100 | NO 101 | COPY_PHASE_STRIP 102 | YES 103 | DSTROOT 104 | /tmp/xcodeproj.dst 105 | GCC_PRECOMPILE_PREFIX_HEADER 106 | YES 107 | INSTALL_PATH 108 | $(BUILT_PRODUCTS_DIR) 109 | IPHONEOS_DEPLOYMENT_TARGET 110 | 8.0 111 | OTHER_CFLAGS 112 | 113 | -DNS_BLOCK_ASSERTIONS=1 114 | $(inherited) 115 | 116 | OTHER_CPLUSPLUSFLAGS 117 | 118 | -DNS_BLOCK_ASSERTIONS=1 119 | $(inherited) 120 | 121 | OTHER_LDFLAGS 122 | 123 | OTHER_LIBTOOLFLAGS 124 | 125 | PRODUCT_NAME 126 | $(TARGET_NAME) 127 | PUBLIC_HEADERS_FOLDER_PATH 128 | $(TARGET_NAME) 129 | SDKROOT 130 | iphoneos 131 | SKIP_INSTALL 132 | YES 133 | VALIDATE_PRODUCT 134 | YES 135 | 136 | isa 137 | XCBuildConfiguration 138 | name 139 | Release 140 | 141 | 2506116E18196191DA99ED9B 142 | 143 | includeInIndex 144 | 1 145 | isa 146 | PBXFileReference 147 | lastKnownFileType 148 | sourcecode.c.objc 149 | path 150 | Pods-ICTutorialOverlay-dummy.m 151 | sourceTree 152 | <group> 153 | 154 | 2996A5BD414875722656DCCB 155 | 156 | includeInIndex 157 | 1 158 | isa 159 | PBXFileReference 160 | lastKnownFileType 161 | sourcecode.c.objc 162 | path 163 | Pods-dummy.m 164 | sourceTree 165 | <group> 166 | 167 | 3651944686EE3D26AE93FD1B 168 | 169 | children 170 | 171 | 9C56CA4913EB5D9256789D4B 172 | 3781031D983E6B51581A91B3 173 | 174 | isa 175 | PBXGroup 176 | name 177 | Products 178 | sourceTree 179 | <group> 180 | 181 | 3781031D983E6B51581A91B3 182 | 183 | explicitFileType 184 | archive.ar 185 | includeInIndex 186 | 0 187 | isa 188 | PBXFileReference 189 | path 190 | libPods-ICTutorialOverlay.a 191 | sourceTree 192 | BUILT_PRODUCTS_DIR 193 | 194 | 3873F114261A5D72C2D3284D 195 | 196 | isa 197 | PBXFileReference 198 | lastKnownFileType 199 | wrapper.framework 200 | name 201 | QuartzCore.framework 202 | path 203 | Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/QuartzCore.framework 204 | sourceTree 205 | DEVELOPER_DIR 206 | 207 | 3FFCD926250A21885E9B6839 208 | 209 | fileRef 210 | 0764161B167A7178868A3B90 211 | isa 212 | PBXBuildFile 213 | 214 | 4E0D2331633EBA94D1E071A6 215 | 216 | buildSettings 217 | 218 | ALWAYS_SEARCH_USER_PATHS 219 | NO 220 | CLANG_CXX_LANGUAGE_STANDARD 221 | gnu++0x 222 | CLANG_CXX_LIBRARY 223 | libc++ 224 | CLANG_ENABLE_MODULES 225 | YES 226 | CLANG_ENABLE_OBJC_ARC 227 | YES 228 | CLANG_WARN_BOOL_CONVERSION 229 | YES 230 | CLANG_WARN_CONSTANT_CONVERSION 231 | YES 232 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE 233 | YES 234 | CLANG_WARN_EMPTY_BODY 235 | YES 236 | CLANG_WARN_ENUM_CONVERSION 237 | YES 238 | CLANG_WARN_INT_CONVERSION 239 | YES 240 | CLANG_WARN_OBJC_ROOT_CLASS 241 | YES 242 | COPY_PHASE_STRIP 243 | NO 244 | ENABLE_NS_ASSERTIONS 245 | NO 246 | GCC_C_LANGUAGE_STANDARD 247 | gnu99 248 | GCC_PREPROCESSOR_DEFINITIONS 249 | 250 | RELEASE=1 251 | 252 | GCC_WARN_64_TO_32_BIT_CONVERSION 253 | YES 254 | GCC_WARN_ABOUT_RETURN_TYPE 255 | YES 256 | GCC_WARN_UNDECLARED_SELECTOR 257 | YES 258 | GCC_WARN_UNINITIALIZED_AUTOS 259 | YES 260 | GCC_WARN_UNUSED_FUNCTION 261 | YES 262 | GCC_WARN_UNUSED_VARIABLE 263 | YES 264 | IPHONEOS_DEPLOYMENT_TARGET 265 | 8.0 266 | STRIP_INSTALLED_PRODUCT 267 | NO 268 | VALIDATE_PRODUCT 269 | YES 270 | 271 | isa 272 | XCBuildConfiguration 273 | name 274 | Release 275 | 276 | 5D631137F85A1150E8BDCE25 277 | 278 | children 279 | 280 | 0764161B167A7178868A3B90 281 | 3873F114261A5D72C2D3284D 282 | 283 | isa 284 | PBXGroup 285 | name 286 | iOS 287 | sourceTree 288 | <group> 289 | 290 | 6AB579E7D5F65FFEBC2FA803 291 | 292 | containerPortal 293 | 8069136BFD685547A81520C5 294 | isa 295 | PBXContainerItemProxy 296 | proxyType 297 | 1 298 | remoteGlobalIDString 299 | 9918A0E1E71A92F26D2A7475 300 | remoteInfo 301 | Pods-ICTutorialOverlay 302 | 303 | 6E87A037D188E52F8E961D39 304 | 305 | fileRef 306 | 2506116E18196191DA99ED9B 307 | isa 308 | PBXBuildFile 309 | 310 | 705426BAD527FD88B0AD3C0F 311 | 312 | children 313 | 314 | 14F825278500051036B03E82 315 | C69107E01968563FCBD887C3 316 | 2996A5BD414875722656DCCB 317 | D0FB9D13554FB950B9FB197C 318 | 98873482BC40AF96BAB1D59B 319 | 8C736B80B3C7E9DA73C1C900 320 | DFC06007DC6ADAD485725C9D 321 | 322 | isa 323 | PBXGroup 324 | name 325 | Pods 326 | path 327 | Target Support Files/Pods 328 | sourceTree 329 | <group> 330 | 331 | 7696F9628C970FA5AD93DA7B 332 | 333 | buildActionMask 334 | 2147483647 335 | files 336 | 337 | 3FFCD926250A21885E9B6839 338 | 339 | isa 340 | PBXFrameworksBuildPhase 341 | runOnlyForDeploymentPostprocessing 342 | 0 343 | 344 | 7726D69CF125D19FD56A4BFA 345 | 346 | children 347 | 348 | D7CB4C9875DA719B32E5644A 349 | 350 | isa 351 | PBXGroup 352 | name 353 | Pods 354 | sourceTree 355 | <group> 356 | 357 | 7A0F9FBFCA317BED6ECA832A 358 | 359 | buildSettings 360 | 361 | ALWAYS_SEARCH_USER_PATHS 362 | NO 363 | CLANG_CXX_LANGUAGE_STANDARD 364 | gnu++0x 365 | CLANG_CXX_LIBRARY 366 | libc++ 367 | CLANG_ENABLE_MODULES 368 | YES 369 | CLANG_ENABLE_OBJC_ARC 370 | YES 371 | CLANG_WARN_BOOL_CONVERSION 372 | YES 373 | CLANG_WARN_CONSTANT_CONVERSION 374 | YES 375 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE 376 | YES 377 | CLANG_WARN_EMPTY_BODY 378 | YES 379 | CLANG_WARN_ENUM_CONVERSION 380 | YES 381 | CLANG_WARN_INT_CONVERSION 382 | YES 383 | CLANG_WARN_OBJC_ROOT_CLASS 384 | YES 385 | COPY_PHASE_STRIP 386 | YES 387 | GCC_C_LANGUAGE_STANDARD 388 | gnu99 389 | GCC_DYNAMIC_NO_PIC 390 | NO 391 | GCC_OPTIMIZATION_LEVEL 392 | 0 393 | GCC_PREPROCESSOR_DEFINITIONS 394 | 395 | DEBUG=1 396 | $(inherited) 397 | 398 | GCC_SYMBOLS_PRIVATE_EXTERN 399 | NO 400 | GCC_WARN_64_TO_32_BIT_CONVERSION 401 | YES 402 | GCC_WARN_ABOUT_RETURN_TYPE 403 | YES 404 | GCC_WARN_UNDECLARED_SELECTOR 405 | YES 406 | GCC_WARN_UNINITIALIZED_AUTOS 407 | YES 408 | GCC_WARN_UNUSED_FUNCTION 409 | YES 410 | GCC_WARN_UNUSED_VARIABLE 411 | YES 412 | IPHONEOS_DEPLOYMENT_TARGET 413 | 8.0 414 | ONLY_ACTIVE_ARCH 415 | YES 416 | STRIP_INSTALLED_PRODUCT 417 | NO 418 | 419 | isa 420 | XCBuildConfiguration 421 | name 422 | Debug 423 | 424 | 7A70C07E763A1F04C98C9F22 425 | 426 | buildConfigurations 427 | 428 | 7A0F9FBFCA317BED6ECA832A 429 | 4E0D2331633EBA94D1E071A6 430 | 431 | defaultConfigurationIsVisible 432 | 0 433 | defaultConfigurationName 434 | Release 435 | isa 436 | XCConfigurationList 437 | 438 | 7CFA0E91C36470F4A84C0709 439 | 440 | includeInIndex 441 | 1 442 | isa 443 | PBXFileReference 444 | lastKnownFileType 445 | text.xcconfig 446 | path 447 | Pods-ICTutorialOverlay.xcconfig 448 | sourceTree 449 | <group> 450 | 451 | 8069136BFD685547A81520C5 452 | 453 | attributes 454 | 455 | LastUpgradeCheck 456 | 0510 457 | 458 | buildConfigurationList 459 | 7A70C07E763A1F04C98C9F22 460 | compatibilityVersion 461 | Xcode 3.2 462 | developmentRegion 463 | English 464 | hasScannedForEncodings 465 | 0 466 | isa 467 | PBXProject 468 | knownRegions 469 | 470 | en 471 | 472 | mainGroup 473 | E1C0205C6FCC9CD90B95C451 474 | productRefGroup 475 | 3651944686EE3D26AE93FD1B 476 | projectDirPath 477 | 478 | projectReferences 479 | 480 | projectRoot 481 | 482 | targets 483 | 484 | 83E409A0CDDACC1C0CE88FA3 485 | 9918A0E1E71A92F26D2A7475 486 | 487 | 488 | 83E409A0CDDACC1C0CE88FA3 489 | 490 | buildConfigurationList 491 | D7E51D5991B58E68BBA75476 492 | buildPhases 493 | 494 | 92332A7D1DF28CD1EC182F36 495 | 7696F9628C970FA5AD93DA7B 496 | 497 | buildRules 498 | 499 | dependencies 500 | 501 | FCDB0AB511C2A1591A1AAC13 502 | 503 | isa 504 | PBXNativeTarget 505 | name 506 | Pods 507 | productName 508 | Pods 509 | productReference 510 | 9C56CA4913EB5D9256789D4B 511 | productType 512 | com.apple.product-type.library.static 513 | 514 | 864B1CA4E19A7CB6A89810A3 515 | 516 | includeInIndex 517 | 1 518 | isa 519 | PBXFileReference 520 | lastKnownFileType 521 | text.xcconfig 522 | path 523 | Pods-ICTutorialOverlay-Private.xcconfig 524 | sourceTree 525 | <group> 526 | 527 | 87272FFAAD74E45A6744BE6D 528 | 529 | buildActionMask 530 | 2147483647 531 | files 532 | 533 | D1F30EA163CBC7AC0DE1CFD0 534 | 535 | isa 536 | PBXHeadersBuildPhase 537 | runOnlyForDeploymentPostprocessing 538 | 0 539 | 540 | 8C4E06535D9322E1A84BCD1B 541 | 542 | buildConfigurations 543 | 544 | 90E71CAEFDC54670397C613D 545 | B68F4A13E89686641CDE506E 546 | 547 | defaultConfigurationIsVisible 548 | 0 549 | defaultConfigurationName 550 | Release 551 | isa 552 | XCConfigurationList 553 | 554 | 8C736B80B3C7E9DA73C1C900 555 | 556 | includeInIndex 557 | 1 558 | isa 559 | PBXFileReference 560 | lastKnownFileType 561 | text.xcconfig 562 | path 563 | Pods.debug.xcconfig 564 | sourceTree 565 | <group> 566 | 567 | 90E71CAEFDC54670397C613D 568 | 569 | baseConfigurationReference 570 | 864B1CA4E19A7CB6A89810A3 571 | buildSettings 572 | 573 | ALWAYS_SEARCH_USER_PATHS 574 | NO 575 | COPY_PHASE_STRIP 576 | NO 577 | DSTROOT 578 | /tmp/xcodeproj.dst 579 | GCC_DYNAMIC_NO_PIC 580 | NO 581 | GCC_OPTIMIZATION_LEVEL 582 | 0 583 | GCC_PRECOMPILE_PREFIX_HEADER 584 | YES 585 | GCC_PREFIX_HEADER 586 | Target Support Files/Pods-ICTutorialOverlay/Pods-ICTutorialOverlay-prefix.pch 587 | GCC_PREPROCESSOR_DEFINITIONS 588 | 589 | DEBUG=1 590 | $(inherited) 591 | 592 | GCC_SYMBOLS_PRIVATE_EXTERN 593 | NO 594 | INSTALL_PATH 595 | $(BUILT_PRODUCTS_DIR) 596 | IPHONEOS_DEPLOYMENT_TARGET 597 | 8.0 598 | OTHER_LDFLAGS 599 | 600 | OTHER_LIBTOOLFLAGS 601 | 602 | PRODUCT_NAME 603 | $(TARGET_NAME) 604 | PUBLIC_HEADERS_FOLDER_PATH 605 | $(TARGET_NAME) 606 | SDKROOT 607 | iphoneos 608 | SKIP_INSTALL 609 | YES 610 | 611 | isa 612 | XCBuildConfiguration 613 | name 614 | Debug 615 | 616 | 92332A7D1DF28CD1EC182F36 617 | 618 | buildActionMask 619 | 2147483647 620 | files 621 | 622 | DF96F3AC9475E9689F6604F1 623 | 624 | isa 625 | PBXSourcesBuildPhase 626 | runOnlyForDeploymentPostprocessing 627 | 0 628 | 629 | 930E2A83F619BBF07A8F7C21 630 | 631 | includeInIndex 632 | 1 633 | isa 634 | PBXFileReference 635 | lastKnownFileType 636 | sourcecode.c.h 637 | name 638 | ICTutorialOverlay.h 639 | path 640 | ICTutorialOverlay/Classes/ICTutorialOverlay.h 641 | sourceTree 642 | <group> 643 | 644 | 98873482BC40AF96BAB1D59B 645 | 646 | includeInIndex 647 | 1 648 | isa 649 | PBXFileReference 650 | lastKnownFileType 651 | text.script.sh 652 | path 653 | Pods-resources.sh 654 | sourceTree 655 | <group> 656 | 657 | 9918A0E1E71A92F26D2A7475 658 | 659 | buildConfigurationList 660 | 8C4E06535D9322E1A84BCD1B 661 | buildPhases 662 | 663 | BE79D5FC770D7CEA31D1C560 664 | A174722E8090BF1E26B6371D 665 | 87272FFAAD74E45A6744BE6D 666 | 667 | buildRules 668 | 669 | dependencies 670 | 671 | isa 672 | PBXNativeTarget 673 | name 674 | Pods-ICTutorialOverlay 675 | productName 676 | Pods-ICTutorialOverlay 677 | productReference 678 | 3781031D983E6B51581A91B3 679 | productType 680 | com.apple.product-type.library.static 681 | 682 | 9C56CA4913EB5D9256789D4B 683 | 684 | explicitFileType 685 | archive.ar 686 | includeInIndex 687 | 0 688 | isa 689 | PBXFileReference 690 | path 691 | libPods.a 692 | sourceTree 693 | BUILT_PRODUCTS_DIR 694 | 695 | A174722E8090BF1E26B6371D 696 | 697 | buildActionMask 698 | 2147483647 699 | files 700 | 701 | 108E8543D387EFFF752E0823 702 | EC467B1FD8063612C8D07D18 703 | 704 | isa 705 | PBXFrameworksBuildPhase 706 | runOnlyForDeploymentPostprocessing 707 | 0 708 | 709 | B0CA2B608745F7EBCB7F9A26 710 | 711 | children 712 | 713 | 705426BAD527FD88B0AD3C0F 714 | 715 | isa 716 | PBXGroup 717 | name 718 | Targets Support Files 719 | sourceTree 720 | <group> 721 | 722 | B68F4A13E89686641CDE506E 723 | 724 | baseConfigurationReference 725 | 864B1CA4E19A7CB6A89810A3 726 | buildSettings 727 | 728 | ALWAYS_SEARCH_USER_PATHS 729 | NO 730 | COPY_PHASE_STRIP 731 | YES 732 | DSTROOT 733 | /tmp/xcodeproj.dst 734 | GCC_PRECOMPILE_PREFIX_HEADER 735 | YES 736 | GCC_PREFIX_HEADER 737 | Target Support Files/Pods-ICTutorialOverlay/Pods-ICTutorialOverlay-prefix.pch 738 | INSTALL_PATH 739 | $(BUILT_PRODUCTS_DIR) 740 | IPHONEOS_DEPLOYMENT_TARGET 741 | 8.0 742 | OTHER_CFLAGS 743 | 744 | -DNS_BLOCK_ASSERTIONS=1 745 | $(inherited) 746 | 747 | OTHER_CPLUSPLUSFLAGS 748 | 749 | -DNS_BLOCK_ASSERTIONS=1 750 | $(inherited) 751 | 752 | OTHER_LDFLAGS 753 | 754 | OTHER_LIBTOOLFLAGS 755 | 756 | PRODUCT_NAME 757 | $(TARGET_NAME) 758 | PUBLIC_HEADERS_FOLDER_PATH 759 | $(TARGET_NAME) 760 | SDKROOT 761 | iphoneos 762 | SKIP_INSTALL 763 | YES 764 | VALIDATE_PRODUCT 765 | YES 766 | 767 | isa 768 | XCBuildConfiguration 769 | name 770 | Release 771 | 772 | BE79D5FC770D7CEA31D1C560 773 | 774 | buildActionMask 775 | 2147483647 776 | files 777 | 778 | E96D40C6AB6E31FF06DDE79D 779 | 6E87A037D188E52F8E961D39 780 | 781 | isa 782 | PBXSourcesBuildPhase 783 | runOnlyForDeploymentPostprocessing 784 | 0 785 | 786 | C69107E01968563FCBD887C3 787 | 788 | includeInIndex 789 | 1 790 | isa 791 | PBXFileReference 792 | lastKnownFileType 793 | text.plist.xml 794 | path 795 | Pods-acknowledgements.plist 796 | sourceTree 797 | <group> 798 | 799 | CEC50FEAAF8AC73DA658007D 800 | 801 | includeInIndex 802 | 1 803 | isa 804 | PBXFileReference 805 | lastKnownFileType 806 | sourcecode.c.h 807 | path 808 | Pods-ICTutorialOverlay-prefix.pch 809 | sourceTree 810 | <group> 811 | 812 | D0FB9D13554FB950B9FB197C 813 | 814 | includeInIndex 815 | 1 816 | isa 817 | PBXFileReference 818 | lastKnownFileType 819 | sourcecode.c.h 820 | path 821 | Pods-environment.h 822 | sourceTree 823 | <group> 824 | 825 | D1F30EA163CBC7AC0DE1CFD0 826 | 827 | fileRef 828 | 930E2A83F619BBF07A8F7C21 829 | isa 830 | PBXBuildFile 831 | 832 | D5655AB6B6BDC86760D1235D 833 | 834 | children 835 | 836 | 7CFA0E91C36470F4A84C0709 837 | 864B1CA4E19A7CB6A89810A3 838 | 2506116E18196191DA99ED9B 839 | CEC50FEAAF8AC73DA658007D 840 | 841 | isa 842 | PBXGroup 843 | name 844 | Support Files 845 | path 846 | ../Target Support Files/Pods-ICTutorialOverlay 847 | sourceTree 848 | <group> 849 | 850 | D7CB4C9875DA719B32E5644A 851 | 852 | children 853 | 854 | 930E2A83F619BBF07A8F7C21 855 | E568478F89CAA4A5C97A5F13 856 | D5655AB6B6BDC86760D1235D 857 | 858 | isa 859 | PBXGroup 860 | name 861 | ICTutorialOverlay 862 | path 863 | ICTutorialOverlay 864 | sourceTree 865 | <group> 866 | 867 | D7E51D5991B58E68BBA75476 868 | 869 | buildConfigurations 870 | 871 | 1301C7A6705BD261E265BD41 872 | 175D2187132D9C26D01BAE72 873 | 874 | defaultConfigurationIsVisible 875 | 0 876 | defaultConfigurationName 877 | Release 878 | isa 879 | XCConfigurationList 880 | 881 | DF96F3AC9475E9689F6604F1 882 | 883 | fileRef 884 | 2996A5BD414875722656DCCB 885 | isa 886 | PBXBuildFile 887 | 888 | DFC06007DC6ADAD485725C9D 889 | 890 | includeInIndex 891 | 1 892 | isa 893 | PBXFileReference 894 | lastKnownFileType 895 | text.xcconfig 896 | path 897 | Pods.release.xcconfig 898 | sourceTree 899 | <group> 900 | 901 | E1C0205C6FCC9CD90B95C451 902 | 903 | children 904 | 905 | E8C83131FD98C5EA1E05D37C 906 | E8765E1161FD19C3B3D3725F 907 | 7726D69CF125D19FD56A4BFA 908 | 3651944686EE3D26AE93FD1B 909 | B0CA2B608745F7EBCB7F9A26 910 | 911 | isa 912 | PBXGroup 913 | sourceTree 914 | <group> 915 | 916 | E568478F89CAA4A5C97A5F13 917 | 918 | includeInIndex 919 | 1 920 | isa 921 | PBXFileReference 922 | lastKnownFileType 923 | sourcecode.c.objc 924 | name 925 | ICTutorialOverlay.m 926 | path 927 | ICTutorialOverlay/Classes/ICTutorialOverlay.m 928 | sourceTree 929 | <group> 930 | 931 | E8765E1161FD19C3B3D3725F 932 | 933 | children 934 | 935 | 5D631137F85A1150E8BDCE25 936 | 937 | isa 938 | PBXGroup 939 | name 940 | Frameworks 941 | sourceTree 942 | <group> 943 | 944 | E8C83131FD98C5EA1E05D37C 945 | 946 | includeInIndex 947 | 1 948 | isa 949 | PBXFileReference 950 | lastKnownFileType 951 | text 952 | name 953 | Podfile 954 | path 955 | ../Podfile 956 | sourceTree 957 | SOURCE_ROOT 958 | xcLanguageSpecificationIdentifier 959 | xcode.lang.ruby 960 | 961 | E96D40C6AB6E31FF06DDE79D 962 | 963 | fileRef 964 | E568478F89CAA4A5C97A5F13 965 | isa 966 | PBXBuildFile 967 | settings 968 | 969 | COMPILER_FLAGS 970 | -DOS_OBJECT_USE_OBJC=0 971 | 972 | 973 | EC467B1FD8063612C8D07D18 974 | 975 | fileRef 976 | 3873F114261A5D72C2D3284D 977 | isa 978 | PBXBuildFile 979 | 980 | FCDB0AB511C2A1591A1AAC13 981 | 982 | isa 983 | PBXTargetDependency 984 | name 985 | Pods-ICTutorialOverlay 986 | target 987 | 9918A0E1E71A92F26D2A7475 988 | targetProxy 989 | 6AB579E7D5F65FFEBC2FA803 990 | 991 | 992 | rootObject 993 | 8069136BFD685547A81520C5 994 | 995 | 996 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Pods/Target Support Files/Pods-ICTutorialOverlay/Pods-ICTutorialOverlay-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-ICTutorialOverlay.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/ICTutorialOverlay" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ICTutorialOverlay" 4 | OTHER_LDFLAGS = ${PODS_ICTUTORIALOVERLAY_OTHER_LDFLAGS} -ObjC 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Pods/Target Support Files/Pods-ICTutorialOverlay/Pods-ICTutorialOverlay-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ICTutorialOverlay : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ICTutorialOverlay 5 | @end 6 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Pods/Target Support Files/Pods-ICTutorialOverlay/Pods-ICTutorialOverlay-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-environment.h" 6 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Pods/Target Support Files/Pods-ICTutorialOverlay/Pods-ICTutorialOverlay.xcconfig: -------------------------------------------------------------------------------- 1 | PODS_ICTUTORIALOVERLAY_OTHER_LDFLAGS = -framework "QuartzCore" -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## ICTutorialOverlay 5 | 6 | Copyright (c) 2013 Ichito Nagata 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining 9 | a copy of this software and associated documentation files (the 10 | "Software"), to deal in the Software without restriction, including 11 | without limitation the rights to use, copy, modify, merge, publish, 12 | distribute, sublicense, and/or sell copies of the Software, and to 13 | permit persons to whom the Software is furnished to do so, subject to 14 | the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be 17 | included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 23 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 24 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | Generated by CocoaPods - http://cocoapods.org 28 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Pods/Target Support Files/Pods/Pods-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2013 Ichito Nagata 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining 20 | a copy of this software and associated documentation files (the 21 | "Software"), to deal in the Software without restriction, including 22 | without limitation the rights to use, copy, modify, merge, publish, 23 | distribute, sublicense, and/or sell copies of the Software, and to 24 | permit persons to whom the Software is furnished to do so, subject to 25 | the following conditions: 26 | 27 | The above copyright notice and this permission notice shall be 28 | included in all copies or substantial portions of the Software. 29 | 30 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 31 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 32 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 33 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 34 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 35 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 36 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 37 | 38 | Title 39 | ICTutorialOverlay 40 | Type 41 | PSGroupSpecifier 42 | 43 | 44 | FooterText 45 | Generated by CocoaPods - http://cocoapods.org 46 | Title 47 | 48 | Type 49 | PSGroupSpecifier 50 | 51 | 52 | StringsTable 53 | Acknowledgements 54 | Title 55 | Acknowledgements 56 | 57 | 58 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Pods/Target Support Files/Pods/Pods-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods : NSObject 3 | @end 4 | @implementation PodsDummy_Pods 5 | @end 6 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Pods/Target Support Files/Pods/Pods-environment.h: -------------------------------------------------------------------------------- 1 | 2 | // To check if a library is compiled with CocoaPods you 3 | // can use the `COCOAPODS` macro definition which is 4 | // defined in the xcconfigs so it is available in 5 | // headers also when they are imported in the client 6 | // project. 7 | 8 | 9 | // ICTutorialOverlay 10 | #define COCOAPODS_POD_AVAILABLE_ICTutorialOverlay 11 | #define COCOAPODS_VERSION_MAJOR_ICTutorialOverlay 0 12 | #define COCOAPODS_VERSION_MINOR_ICTutorialOverlay 0 13 | #define COCOAPODS_VERSION_PATCH_ICTutorialOverlay 6 14 | 15 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Pods/Target Support Files/Pods/Pods-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | install_resource() 10 | { 11 | case $1 in 12 | *.storyboard) 13 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 14 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 15 | ;; 16 | *.xib) 17 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 18 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 19 | ;; 20 | *.framework) 21 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 22 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 23 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 24 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 25 | ;; 26 | *.xcdatamodel) 27 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 28 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 29 | ;; 30 | *.xcdatamodeld) 31 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 32 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 33 | ;; 34 | *.xcmappingmodel) 35 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" 36 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" 37 | ;; 38 | *.xcassets) 39 | ;; 40 | /*) 41 | echo "$1" 42 | echo "$1" >> "$RESOURCES_TO_COPY" 43 | ;; 44 | *) 45 | echo "${PODS_ROOT}/$1" 46 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 47 | ;; 48 | esac 49 | } 50 | 51 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 52 | if [[ "${ACTION}" == "install" ]]; then 53 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 54 | fi 55 | rm -f "$RESOURCES_TO_COPY" 56 | 57 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ] 58 | then 59 | case "${TARGETED_DEVICE_FAMILY}" in 60 | 1,2) 61 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 62 | ;; 63 | 1) 64 | TARGET_DEVICE_ARGS="--target-device iphone" 65 | ;; 66 | 2) 67 | TARGET_DEVICE_ARGS="--target-device ipad" 68 | ;; 69 | *) 70 | TARGET_DEVICE_ARGS="--target-device mac" 71 | ;; 72 | esac 73 | find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 74 | fi 75 | -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Pods/Target Support Files/Pods/Pods.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ICTutorialOverlay" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/ICTutorialOverlay" 4 | OTHER_LDFLAGS = -ObjC -l"Pods-ICTutorialOverlay" -framework "QuartzCore" 5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /ICTutorialOverlayDemo/Pods/Target Support Files/Pods/Pods.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ICTutorialOverlay" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/ICTutorialOverlay" 4 | OTHER_LDFLAGS = -ObjC -l"Pods-ICTutorialOverlay" -framework "QuartzCore" 5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Ichito Nagata 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ICTutorialOverlay 2 | 3 | A utility for making "Overlay Tutorial" 4 | 5 | ## ICTutorialOverlayDemo 6 | 7 | To run the demo, clone this repository or download as .zip and open ICTutorialOverlayDemo.xcworkspace 8 | It is very important to open the .xcworkspace file if you want to run the demo. 9 | 10 | ## Adding ICTutorialOverlay to your project 11 | 12 | ### Cocoapods 13 | 14 | [CocoaPods](http://cocoapods.org) is the recommended way to add ICTutorialOverlay to your project. 15 | 16 | 1. Add ICTutorialOverlay to your Podfile `pod 'ICTutorialOverlay'`. 17 | 2. Install the pod(s) by running `pod install`. 18 | 3. Include ICTutorialOverlay to your files with `#import "ICTutorialOverlay.h"`. 19 | 20 | ### Clone from Github 21 | 22 | 1. Clone repository from github and copy files directly, or add it as a git submodule. 23 | 2. Add ICTutorialOverlay (.h and .m) files to your project. 24 | 25 | ### Example Usage 26 | 27 | ```objective-c 28 | ICTutorialOverlay *overlay = [[ICTutorialOverlay alloc] init]; 29 | overlay.hideWhenTapped = NO; 30 | overlay.animated = YES; 31 | [overlay addHoleWithView:self.roundRectButton padding:8.0f offset:CGSizeZero form:ICTutorialOverlayHoleFormRoundedRectangle transparentEvent:YES]; 32 | 33 | 34 | UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(100, 170, 220, 150)]; 35 | label.backgroundColor = [UIColor clearColor]; 36 | label.textColor = [UIColor whiteColor]; 37 | label.numberOfLines = 0; 38 | label.text = @"You can place any views on the overlay"; 39 | [overlay addSubview:label]; 40 | 41 | [overlay show]; 42 | ``` 43 | 44 | ## Suggestions, requests, feedback and acknowledgements 45 | 46 | Any feedback can be can be sent to: i.nagata110@gmail.com. 47 | 48 | This software is licensed under the MIT License. 49 | --------------------------------------------------------------------------------