• 大小: 0.59M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-27
  • 标签: 刮刮卡  

资源简介

ios 刮刮卡

资源截图

代码片段和文件信息

//
//  STScratchView.m
//  STScratchView
//
//  Created by Sebastien Thiebaud on 12/17/12.
//  Copyright (c) 2012 Sebastien Thiebaud. All rights reserved.
//

#import “STScratchView.h“

@implementation STScratchView

- (id)initWithframe:(CGRect)frame
{
    self = [super initWithframe:frame];
    if (self) {
        [self setOpaque:NO];
        
        _sizeBrush = 10.0;
    }
    return self;
}

#pragma mark -
#pragma mark CoreGraphics methods

// Will be called every touch and at the first init
- (void)drawRect:(CGRect)rect
{
    [super drawRect:rect];
    
    UIImage *imageToDraw = [UIImage imageWithCGImage:scratchImage];
    [imageToDraw drawInRect:CGRectMake(0.0 0.0 self.frame.size.width self.frame.size.height)];
}

// Method to change the view which will be scratched
- (void)setH

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-12-26 11:06  STScratchView\
     文件        6148  2012-12-26 11:06  STScratchView\.DS_Store
     文件           9  2012-12-22 13:54  STScratchView\.gitignore
     文件        1097  2012-12-22 13:54  STScratchView\LICENSE
     文件        1121  2012-12-22 13:54  STScratchView\README.md
     目录           0  2012-12-22 13:54  STScratchView\STScratchView\
     文件         581  2012-12-22 13:54  STScratchView\STScratchView.podspec
     目录           0  2012-12-26 11:06  STScratchView\STScratchViewExample\
     文件        6148  2012-12-26 11:06  STScratchView\STScratchViewExample\.DS_Store
     目录           0  2012-12-22 13:54  STScratchView\STScratchViewExample\STScratchViewExample\
     目录           0  2012-12-22 13:54  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\
     文件       16619  2012-12-22 13:54  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\project.pbxproj
     目录           0  2012-12-22 13:54  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\project.xcworkspace\
     文件         165  2012-12-22 13:54  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\project.xcworkspace\contents.xcworkspacedata
     目录           0  2012-12-26 11:06  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\project.xcworkspace\xcuserdata\
     目录           0  2012-12-26 11:07  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\project.xcworkspace\xcuserdata\ericwang.xcuserdatad\
     文件        7268  2012-12-26 11:07  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\project.xcworkspace\xcuserdata\ericwang.xcuserdatad\UserInterfaceState.xcuserstate
     目录           0  2012-12-22 13:54  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\project.xcworkspace\xcuserdata\sebastienthiebaud.xcuserdatad\
     文件       25099  2012-12-22 13:54  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\project.xcworkspace\xcuserdata\sebastienthiebaud.xcuserdatad\UserInterfaceState.xcuserstate
     文件         333  2012-12-22 13:54  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\project.xcworkspace\xcuserdata\sebastienthiebaud.xcuserdatad\WorkspaceSettings.xcsettings
     目录           0  2012-12-26 11:06  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\xcuserdata\
     目录           0  2012-12-26 11:06  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\xcuserdata\ericwang.xcuserdatad\
     目录           0  2012-12-26 11:06  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\xcuserdata\ericwang.xcuserdatad\xcschemes\
     文件        3291  2012-12-26 11:06  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\xcuserdata\ericwang.xcuserdatad\xcschemes\STScratchViewExample.xcscheme
     文件         492  2012-12-26 11:06  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\xcuserdata\ericwang.xcuserdatad\xcschemes\xcschememanagement.plist
     目录           0  2012-12-22 13:54  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\xcuserdata\sebastienthiebaud.xcuserdatad\
     目录           0  2012-12-22 13:54  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\xcuserdata\sebastienthiebaud.xcuserdatad\xcdebugger\
     文件          91  2012-12-22 13:54  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\xcuserdata\sebastienthiebaud.xcuserdatad\xcdebugger\Breakpoints.xcbkptlist
     目录           0  2012-12-22 13:54  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\xcuserdata\sebastienthiebaud.xcuserdatad\xcschemes\
     文件        3291  2012-12-22 13:54  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\xcuserdata\sebastienthiebaud.xcuserdatad\xcschemes\STScratchViewExample.xcscheme
     文件         492  2012-12-22 13:54  STScratchView\STScratchViewExample\STScratchViewExample.xcodeproj\xcuserdata\sebastienthiebaud.xcuserdatad\xcschemes\xcschememanagement.plist
............此处省略79个文件信息

评论

共有 条评论