#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self createUI];
}
-(void)createUI
{
//创建拼图背景
UIView* backView=[[UIView alloc]initWithFrame:CGRectMake(10, 60, 300, 300)];
backView.backgroundColor=[UIColor whiteColor];
backView.tag=100;
[self.view addSubview:backView];
//创建提示图片
UIImageView* imageView=[[UIImageView alloc]initWithFrame:CGRectMake(100, 380, 80, 80)];
UIImage* image1=[UIImage imageNamed:@"king2.png"];
简易拼图(OC)
最新推荐文章于 2022-06-27 17:25:01 发布
本文介绍如何使用Objective-C编程语言开发一款简单的拼图游戏。从界面设计到逻辑实现,详细讲解了游戏的核心功能,包括图片切割、随机打乱和用户操作验证等步骤。
摘要由CSDN通过智能技术生成