效果图:
工程图:
此代码需要加入第三方库RoundDisk.
代码:
#import "AppDelegate.h" //加入头文件 #import "RoundDiskViewController.h" - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. RoundDiskViewController *roundViewController = [[RoundDiskViewController alloc] init]; [self.window addSubview:roundViewController.view]; self.window.backgroundColor = [UIColor whiteColor]; [self.window makeKeyAndVisible]; return YES; }
时间: 2024-10-15 00:43:02