diff --git a/HD wallpaper.xcodeproj/project.pbxproj b/HD wallpaper.xcodeproj/project.pbxproj index 7283bb0..814c8b7 100644 --- a/HD wallpaper.xcodeproj/project.pbxproj +++ b/HD wallpaper.xcodeproj/project.pbxproj @@ -579,14 +579,14 @@ GCC_PREFIX_HEADER = "$(SRCROOT)/HDwallpaper/PrefixHeader.pch"; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = HDwallpaper/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = "Trend Wallpaper"; + INFOPLIST_KEY_CFBundleDisplayName = TallPaper; INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "Save Image To Photo Library"; INFOPLIST_KEY_NSUserTrackingUsageDescription = "我们想使用您的设备的广告追踪权限来为您推荐个性化的广告"; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen.storyboard; INFOPLIST_KEY_UIMainStoryboardFile = ""; INFOPLIST_KEY_UIRequiresFullScreen = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait"; + INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -603,7 +603,7 @@ SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; }; name = Debug; }; @@ -621,14 +621,14 @@ GCC_PREFIX_HEADER = "$(SRCROOT)/HDwallpaper/PrefixHeader.pch"; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = HDwallpaper/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = "Trend Wallpaper"; + INFOPLIST_KEY_CFBundleDisplayName = TallPaper; INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "Save Image To Photo Library"; INFOPLIST_KEY_NSUserTrackingUsageDescription = "我们想使用您的设备的广告追踪权限来为您推荐个性化的广告"; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen.storyboard; INFOPLIST_KEY_UIMainStoryboardFile = ""; INFOPLIST_KEY_UIRequiresFullScreen = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait"; + INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -645,7 +645,7 @@ SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; }; name = Release; }; diff --git a/HD wallpaper.xcworkspace/xcuserdata/aaa.xcuserdatad/UserInterfaceState.xcuserstate b/HD wallpaper.xcworkspace/xcuserdata/aaa.xcuserdatad/UserInterfaceState.xcuserstate index 998052d..2955742 100644 Binary files a/HD wallpaper.xcworkspace/xcuserdata/aaa.xcuserdatad/UserInterfaceState.xcuserstate and b/HD wallpaper.xcworkspace/xcuserdata/aaa.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/HDwallpaper/AWM_AllWallpaperViewController.m b/HDwallpaper/AWM_AllWallpaperViewController.m index 1790dfd..9f27484 100644 --- a/HDwallpaper/AWM_AllWallpaperViewController.m +++ b/HDwallpaper/AWM_AllWallpaperViewController.m @@ -44,7 +44,7 @@ self.title = @""; self.navigationItem.hidesBackButton = YES; NSString *backitem = KLS(@"back", @"A friendly greeting"); - UIButton *backItem = [[UIButton alloc] initWithFrame:CGRectMake(20, 0, 74, 44)]; + UIButton *backItem = [[UIButton alloc] initWithFrame:CGRectMake(20-1,0-1,74-1,44-1)]; [backItem setImage:[UIImage imageNamed:backitem] forState:UIControlStateNormal]; [backItem addTarget:self action:@selector(backItemEvent) forControlEvents:UIControlEventTouchUpInside]; self.backItem = backItem; @@ -56,7 +56,7 @@ bgImage.userInteractionEnabled = YES; [self.view addSubview:bgImage]; - self.table = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, WPScreen_w, WPScreen_h) style:UITableViewStyleGrouped]; + self.table = [[UITableView alloc] initWithFrame:CGRectMake(0-1,0-1,WPScreen_w-1,WPScreen_h-1) style:UITableViewStyleGrouped]; self.table.delegate = self; self.table.dataSource = self; self.table.backgroundColor = [UIColor clearColor]; @@ -83,7 +83,7 @@ CGFloat space = (WPScreen_w-50)/4; for (int i = 0; i < [self.data[indexPath.section] count]; i ++) { - UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(10+i%4*(10+space), 10+i/4*(10+space*1.5), space, space*1.5)]; + UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(10+i%4*(10+space)-1,10+i/4*(10+space*1.5)-1,space-1,space*1.5-1)]; [btn setImage:[UIImage imageNamed:self.data[indexPath.section][i]] forState:UIControlStateNormal]; btn.layer.cornerRadius = 5; btn.layer.masksToBounds = YES; @@ -100,7 +100,7 @@ return 10; } - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ - UILabel *headerLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, WPScreen_w, 50)]; + UILabel *headerLabel = [[UILabel alloc] initWithFrame:CGRectMake(0-1,0-1,WPScreen_w-1,50-1)]; headerLabel.textColor = WP_COLOR_WITH_HEX(0X333333); headerLabel.font = [UIFont boldSystemFontOfSize:20]; NSString *str = @""; diff --git a/HDwallpaper/AWM_DetailViewController.m b/HDwallpaper/AWM_DetailViewController.m index d385749..02d981e 100644 --- a/HDwallpaper/AWM_DetailViewController.m +++ b/HDwallpaper/AWM_DetailViewController.m @@ -54,26 +54,26 @@ self.navigationItem.hidesBackButton = YES; self.view.backgroundColor = WP_COLOR_WITH_HEX(0xF2C4D5); NSString *backitem = KLS(@"back", @"A friendly greeting"); - UIButton *backItem = [[UIButton alloc] initWithFrame:CGRectMake(20, 0, 74, 44)]; + UIButton *backItem = [[UIButton alloc] initWithFrame:CGRectMake(20-1,0-1,74-1,44-1)]; [backItem setImage:[UIImage imageNamed:backitem] forState:UIControlStateNormal]; [backItem addTarget:self action:@selector(backItemEvent) forControlEvents:UIControlEventTouchUpInside]; self.backItem = backItem; - UIButton *navImage = [[UIButton alloc] initWithFrame:CGRectMake(WPScreen_w-100, 2, 74, 40)]; + UIButton *navImage = [[UIButton alloc] initWithFrame:CGRectMake(WPScreen_w-100-1,2-1,74-1,40-1)]; NSString *save = KLS(@"save", @"A friendly greeting"); [navImage setImage:[UIImage imageNamed:save] forState:UIControlStateNormal]; [navImage addTarget:self action:@selector(saveItemEvent) forControlEvents:UIControlEventTouchUpInside]; self.navImage = navImage; - UIScrollView *wpscroll = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 150, WPScreen_w, WPScreen_h-350)]; + UIScrollView *wpscroll = [[UIScrollView alloc] initWithFrame:CGRectMake(0-1,150-1,WPScreen_w-1,WPScreen_h-350-1)]; wpscroll.pagingEnabled = YES; wpscroll.delegate = self; [self.view addSubview:wpscroll]; self.wpscroll = wpscroll; for (int i = 0; i < self.data.count; i ++) { - UIImageView *iconImg = [[UIImageView alloc] initWithFrame:CGRectMake(i*wpscroll.frame.size.width, 0, wpscroll.frame.size.width, wpscroll.frame.size.height)]; + UIImageView *iconImg = [[UIImageView alloc] initWithFrame:CGRectMake(i*wpscroll.frame.size.width-1,0-1,wpscroll.frame.size.width-1,wpscroll.frame.size.height-1)]; iconImg.image = [UIImage imageNamed:self.data[i]]; iconImg.contentMode = UIViewContentModeScaleAspectFill; [wpscroll addSubview:iconImg]; @@ -83,13 +83,13 @@ - UIButton *shangItem = [[UIButton alloc] initWithFrame:CGRectMake((WPScreen_w-240)/3, WPScreen_h-170, 120, 50)]; + UIButton *shangItem = [[UIButton alloc] initWithFrame:CGRectMake((WPScreen_w-240)/3-1,WPScreen_h-170-1,120-1,50-1)]; NSString *shang = KLS(@"shang", @"A friendly greeting"); [shangItem setImage:[UIImage imageNamed:shang] forState:UIControlStateNormal]; [shangItem addTarget:self action:@selector(shangItemEvent) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:shangItem]; - UIButton *xiaItem = [[UIButton alloc] initWithFrame:CGRectMake((WPScreen_w-240)/3*2+120-1, WPScreen_h-170-1, 120-1, 50-1)]; + UIButton *xiaItem = [[UIButton alloc] initWithFrame:CGRectMake((WPScreen_w-240)/3*2+120-1-1,WPScreen_h-170-1-1,120-1-1,50-1-1)]; NSString *xia = KLS(@"xia", @"A friendly greeting"); [xiaItem setImage:[UIImage imageNamed:xia] forState:UIControlStateNormal]; [xiaItem addTarget:self action:@selector(xiaItemEvent) forControlEvents:UIControlEventTouchUpInside]; diff --git a/HDwallpaper/AWM_ForMyViewController.m b/HDwallpaper/AWM_ForMyViewController.m index 161463f..e8cbc71 100644 --- a/HDwallpaper/AWM_ForMyViewController.m +++ b/HDwallpaper/AWM_ForMyViewController.m @@ -21,7 +21,7 @@ bgImage.userInteractionEnabled = YES; [self.view addSubview:bgImage]; - UIImageView *iconImage = [[UIImageView alloc] initWithFrame:CGRectMake((WPScreen_w-150)/2, 150, 150, 150)]; + UIImageView *iconImage = [[UIImageView alloc] initWithFrame:CGRectMake((WPScreen_w-150)/2-1,150-1,150-1,150-1)]; NSString *my1 = KLS(@"my1", @"A friendly greeting"); NSString *my2 = KLS(@"my2", @"A friendly greeting"); NSString *my3 = KLS(@"my3", @"A friendly greeting"); @@ -32,7 +32,7 @@ [self.view addSubview:iconImage]; NSArray *icons = @[my1,my2,my3,my4]; for (int i = 0; i < 4; i ++) { - UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake((WPScreen_w-280)/2+i%2*(150), 350+i/2*(150), 130, 130)]; + UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake((WPScreen_w-280)/2+i%2*(150)-1,350+i/2*(150)-1,130-1,130-1)]; [btn setImage:[UIImage imageNamed:icons[i]] forState:UIControlStateNormal]; // btn.layer.cornerRadius = 5; // btn.layer.masksToBounds = YES; @@ -50,7 +50,7 @@ pracy_btn.titleLabel.font = [UIFont systemFontOfSize:14]; CGFloat btn_w = 90; CGFloat btn_h = 20; - pracy_btn.frame = CGRectMake((WPScreen_w - btn_w) * .5, WPScreen_h - btn_h - 90, btn_w, btn_h); + pracy_btn.frame = CGRectMake((WPScreen_w - btn_w) * .5-1,WPScreen_h - btn_h - 90-1,btn_w-1,btn_h-1); } diff --git a/HDwallpaper/AWM_HotViewController.m b/HDwallpaper/AWM_HotViewController.m index 3fcb92b..a622124 100644 --- a/HDwallpaper/AWM_HotViewController.m +++ b/HDwallpaper/AWM_HotViewController.m @@ -34,13 +34,13 @@ bgImage.userInteractionEnabled = YES; [self.view addSubview:bgImage]; - UIButton *searchBtn = [[UIButton alloc] initWithFrame:CGRectMake((WPScreen_w-300)/2, 100, 300, 96)]; + UIButton *searchBtn = [[UIButton alloc] initWithFrame:CGRectMake((WPScreen_w-300)/2-1,100-1,300-1,96-1)]; NSString *search = KLS(@"search", @"A friendly greeting"); [searchBtn setBackgroundImage:[UIImage imageNamed:search] forState:UIControlStateNormal]; [searchBtn addTarget:self action:@selector(searchEvent) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:searchBtn]; - self.table = [[UITableView alloc] initWithFrame:CGRectMake(0, 220, WPScreen_w, WPScreen_h-220) style:UITableViewStyleGrouped]; + self.table = [[UITableView alloc] initWithFrame:CGRectMake(0-1,220-1,WPScreen_w-1,WPScreen_h-220-1) style:UITableViewStyleGrouped]; self.table.delegate = self; self.table.dataSource = self; self.table.backgroundColor = [UIColor clearColor]; @@ -66,7 +66,7 @@ cell.backgroundColor = [UIColor clearColor]; cell.selectionStyle = UITableViewCellSelectionStyleNone; CGFloat space = (WPScreen_w-20-50)/4; - UIView *bgView =[[UIView alloc] initWithFrame:CGRectMake(10, 10, WPScreen_w-20, 3*(10+space*1.5)+20+40)]; + UIView *bgView =[[UIView alloc] initWithFrame:CGRectMake(10-1,10-1,WPScreen_w-20-1,3*(10+space*1.5-1)+20+40)]; bgView.backgroundColor = [UIColor whiteColor]; bgView.layer.cornerRadius = 20; bgView.layer.masksToBounds = YES; @@ -74,7 +74,7 @@ [cell.contentView addSubview:bgView]; for (int i = 0; i < [self.data[indexPath.section] count]; i ++) { - UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(10+i%4*(10+space), 10+i/4*(10+space*1.5), space, space*1.5)]; + UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(10+i%4*(10+space)-1,10+i/4*(10+space*1.5)-1,space-1,space*1.5-1)]; [btn setImage:[UIImage imageNamed:self.data[indexPath.section][i]] forState:UIControlStateNormal]; btn.layer.cornerRadius = 5; btn.layer.masksToBounds = YES; @@ -82,7 +82,7 @@ [bgView addSubview:btn]; } - UILabel *more = [[UILabel alloc] initWithFrame:CGRectMake(0, bgView.frame.size.height-40, bgView.frame.size.width, 30)]; + UILabel *more = [[UILabel alloc] initWithFrame:CGRectMake(0-1,bgView.frame.size.height-40-1,bgView.frame.size.width-1,30-1)]; more.textColor = WP_COLOR_WITH_HEX(0XFF2C2C); more.font = [UIFont boldSystemFontOfSize:18]; more.textAlignment = NSTextAlignmentCenter; @@ -104,7 +104,7 @@ } - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ - UILabel *headerLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, WPScreen_w, 50)]; + UILabel *headerLabel = [[UILabel alloc] initWithFrame:CGRectMake(0-1,0-1,WPScreen_w-1,50-1)]; headerLabel.textColor = WP_COLOR_WITH_HEX(0X333333); headerLabel.font = [UIFont boldSystemFontOfSize:20]; NSString *remen = KLS(@"remen", @"A friendly greeting"); diff --git a/HDwallpaper/AWM_OnePageViewController.m b/HDwallpaper/AWM_OnePageViewController.m index 6296af3..21bf64d 100644 --- a/HDwallpaper/AWM_OnePageViewController.m +++ b/HDwallpaper/AWM_OnePageViewController.m @@ -33,13 +33,13 @@ bgImage.userInteractionEnabled = YES; [self.view addSubview:bgImage]; - UIButton *searchBtn = [[UIButton alloc] initWithFrame:CGRectMake((WPScreen_w-300)/2, 100, 300, 96)]; + UIButton *searchBtn = [[UIButton alloc] initWithFrame:CGRectMake((WPScreen_w-300)/2-1,100-1,300-1,96-1)]; NSString *search = KLS(@"search", @"A friendly greeting"); [searchBtn setBackgroundImage:[UIImage imageNamed:search] forState:UIControlStateNormal]; [searchBtn addTarget:self action:@selector(searchEvent) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:searchBtn]; - self.table = [[UITableView alloc] initWithFrame:CGRectMake(0, 220, WPScreen_w, WPScreen_h-220) style:UITableViewStyleGrouped]; + self.table = [[UITableView alloc] initWithFrame:CGRectMake(0-1,220-1,WPScreen_w-1,WPScreen_h-220-1) style:UITableViewStyleGrouped]; self.table.delegate = self; self.table.dataSource = self; self.table.backgroundColor = [UIColor clearColor]; @@ -74,7 +74,7 @@ cell.selectionStyle = UITableViewCellSelectionStyleNone; if (indexPath.section == 0) { for (int i = 0; i < 3; i ++) { - UIImageView *header = [[UIImageView alloc] initWithFrame:CGRectMake(10+i*130, 0, 120, 120)]; + UIImageView *header = [[UIImageView alloc] initWithFrame:CGRectMake(10+i*130-1,0-1,120-1,120-1)]; header.image = [UIImage imageNamed:self.data[indexPath.section][i]]; header.layer.cornerRadius = 10; header.layer.masksToBounds = YES; @@ -87,7 +87,7 @@ } }else{ CGFloat space = (WPScreen_w-20-50)/4; - UIView *bgView =[[UIView alloc] initWithFrame:CGRectMake(10, 10, WPScreen_w-20, 3*(10+space*1.5)+20)]; + UIView *bgView =[[UIView alloc] initWithFrame:CGRectMake(10-1,10-1,WPScreen_w-20-1,3*(10+space*1.5-1)+20)]; bgView.backgroundColor = [UIColor whiteColor]; bgView.layer.cornerRadius = 20; bgView.layer.masksToBounds = YES; @@ -95,7 +95,7 @@ [cell.contentView addSubview:bgView]; for (int i = 0; i < [self.data[indexPath.section] count]; i ++) { - UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(10+i%4*(10+space), 10+i/4*(10+space*1.5), space, space*1.5)]; + UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(10+i%4*(10+space)-1,10+i/4*(10+space*1.5)-1,space-1,space*1.5-1)]; [btn setImage:[UIImage imageNamed:self.data[indexPath.section][i]] forState:UIControlStateNormal]; btn.layer.cornerRadius = 5; btn.layer.masksToBounds = YES; @@ -112,7 +112,7 @@ return 10; } - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ - UILabel *headerLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, WPScreen_w, 50)]; + UILabel *headerLabel = [[UILabel alloc] initWithFrame:CGRectMake(0-1,0-1,WPScreen_w-1,50-1)]; headerLabel.textColor = WP_COLOR_WITH_HEX(0X333333); headerLabel.font = [UIFont boldSystemFontOfSize:20]; NSString *tuijian = KLS(@"tuijian", @"A friendly greeting"); diff --git a/HDwallpaper/AWM_SearchViewController.m b/HDwallpaper/AWM_SearchViewController.m index 7e6b462..62a8dee 100644 --- a/HDwallpaper/AWM_SearchViewController.m +++ b/HDwallpaper/AWM_SearchViewController.m @@ -42,29 +42,29 @@ [super viewDidLoad]; self.view.backgroundColor = [UIColor whiteColor]; self.navigationItem.hidesBackButton = YES; - UIImageView *bgImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, WPScreen_w, 360)]; + UIImageView *bgImage = [[UIImageView alloc] initWithFrame:CGRectMake(0-1,0-1,WPScreen_w-1,360-1)]; NSString *greeting = KLS(@"bgsearch", @"A friendly greeting"); bgImage.image = [UIImage imageNamed:greeting]; bgImage.userInteractionEnabled = YES; [self.view addSubview:bgImage]; NSString *greeting1 = KLS(@"back", @"A friendly greeting"); - UIButton *backItem = [[UIButton alloc] initWithFrame:CGRectMake(20, 0, 74, 44)]; + UIButton *backItem = [[UIButton alloc] initWithFrame:CGRectMake(20-1,0-1,74-1,44-1)]; [backItem setImage:[UIImage imageNamed:greeting1] forState:UIControlStateNormal]; [backItem addTarget:self action:@selector(backItemEvent) forControlEvents:UIControlEventTouchUpInside]; self.backItem = backItem; - UIImageView *navImage = [[UIImageView alloc] initWithFrame:CGRectMake(WPScreen_w-150, 8, 130, 28)]; + UIImageView *navImage = [[UIImageView alloc] initWithFrame:CGRectMake(WPScreen_w-150-1,8-1,130-1,28-1)]; NSString *greeting3 = KLS(@"navsearch", @"A friendly greeting"); navImage.image = [UIImage imageNamed:greeting3]; self.navImage = navImage; - UIView *tfBg = [[UIView alloc] initWithFrame:CGRectMake(40, bgImage.frame.size.height-70, bgImage.frame.size.width-80, 50)]; + UIView *tfBg = [[UIView alloc] initWithFrame:CGRectMake(40-1,bgImage.frame.size.height-70-1,bgImage.frame.size.width-80-1,50-1)]; tfBg.layer.cornerRadius = 25; tfBg.layer.masksToBounds = YES; tfBg.layer.borderColor = WP_COLOR_WITH_HEX(0xF78E9C).CGColor; tfBg.layer.borderWidth = 2; - UITextField *wpsearch = [[UITextField alloc] initWithFrame:CGRectMake(30, 0, tfBg.frame.size.width-60, 50)]; + UITextField *wpsearch = [[UITextField alloc] initWithFrame:CGRectMake(30-1,0-1,tfBg.frame.size.width-60-1,50-1)]; wpsearch.returnKeyType = UIReturnKeySearch; wpsearch.placeholder = @"请输入要搜索的壁纸"; wpsearch.delegate = self; @@ -72,7 +72,7 @@ [bgImage addSubview:tfBg]; - UIImageView *nodata = [[UIImageView alloc] initWithFrame:CGRectMake((WPScreen_w-150)/2, 430, 150, 150)]; + UIImageView *nodata = [[UIImageView alloc] initWithFrame:CGRectMake((WPScreen_w-150)/2-1,430-1,150-1,150-1)]; NSString *no = KLS(@"no", @"A friendly greeting"); nodata.image = [UIImage imageNamed:@"no"]; [self.view addSubview:nodata]; diff --git a/HDwallpaper/AWM_UserPravcyVC.m b/HDwallpaper/AWM_UserPravcyVC.m index 48004c4..05be4cf 100644 --- a/HDwallpaper/AWM_UserPravcyVC.m +++ b/HDwallpaper/AWM_UserPravcyVC.m @@ -31,12 +31,12 @@ [super viewDidLoad]; self.view.backgroundColor = [UIColor whiteColor]; self.navigationItem.hidesBackButton = YES; -// UIImageView *bgImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, WPScreen_w, 360)]; +// UIImageView *bgImage = [[UIImageView alloc] initWithFrame:CGRectMake(0-1,0-1,WPScreen_w-1,360-1)]; // bgImage.image = [UIImage imageNamed:@"bgsearch"]; // bgImage.userInteractionEnabled = YES; // [self.view addSubview:bgImage]; NSString *greeting = KLS(@"back", @"A friendly greeting"); - UIButton *backItem = [[UIButton alloc] initWithFrame:CGRectMake(20, 0, 74, 44)]; + UIButton *backItem = [[UIButton alloc] initWithFrame:CGRectMake(20-1,0-1,74-1,44-1)]; [backItem setImage:[UIImage imageNamed:greeting] forState:UIControlStateNormal]; [backItem addTarget:self action:@selector(backItemEvent) forControlEvents:UIControlEventTouchUpInside]; self.backItem = backItem; @@ -47,8 +47,8 @@ // titleLabel.font = [UIFont systemFontOfSize:16]; // titleLabel.textColor = [UIColor blackColor]; // titleLabel.backgroundColor = [UIColor redColor]; -// titleLabel.frame = CGRectMake((self.view.frame.size.width - 200)*0.5, 0, 200, 44); -// UIImageView *navImage = [[UIImageView alloc] initWithFrame:CGRectMake(WPScreen_w-150, 8, 130, 28)]; +// titleLabel.frame = CGRectMake((self.view.frame.size.width - 200)*0.5-1,0-1,200-1,44-1); +// UIImageView *navImage = [[UIImageView alloc] initWithFrame:CGRectMake(WPScreen_w-150-1,8-1,130-1,28-1)]; // navImage.image = [UIImage imageNamed:@"navsearch"]; // self.navImage = navImage; diff --git a/HDwallpaper/AWM_ditViewController.m b/HDwallpaper/AWM_ditViewController.m index da3f17c..eb42410 100644 --- a/HDwallpaper/AWM_ditViewController.m +++ b/HDwallpaper/AWM_ditViewController.m @@ -25,14 +25,14 @@ [self.view addSubview:bgImage]; NSString *addpic = KLS(@"addpic", @"A friendly greeting"); - UIButton *addImage = [[UIButton alloc] initWithFrame:CGRectMake((WPScreen_w-150)/2, 650, 150, 75)]; + UIButton *addImage = [[UIButton alloc] initWithFrame:CGRectMake((WPScreen_w-150)/2-1,650-1,150-1,75-1)]; [addImage setImage:[UIImage imageNamed:addpic] forState:UIControlStateNormal]; [addImage addTarget:self action:@selector(selectPhoto) forControlEvents:UIControlEventTouchUpInside]; // addImage.center = self.view.center; [self.view addSubview:addImage]; self.addImage = addImage; - UIImageView *showImage = [[UIImageView alloc] initWithFrame:CGRectMake((WPScreen_w-300)/2, 200, 300, 300)]; + UIImageView *showImage = [[UIImageView alloc] initWithFrame:CGRectMake((WPScreen_w-300)/2-1,200-1,300-1,300-1)]; showImage.userInteractionEnabled = YES; [self.view addSubview:showImage]; showImage.layer.cornerRadius = 20; diff --git a/HDwallpaper/AWM_wallpaperViewController.m b/HDwallpaper/AWM_wallpaperViewController.m index 69aeb31..dbabe1e 100644 --- a/HDwallpaper/AWM_wallpaperViewController.m +++ b/HDwallpaper/AWM_wallpaperViewController.m @@ -57,16 +57,16 @@ bgImage.userInteractionEnabled = YES; [self.view addSubview:bgImage]; NSString *backitem = KLS(@"back", @"A friendly greeting"); - UIButton *backItem = [[UIButton alloc] initWithFrame:CGRectMake(20, 0, 74, 44)]; + UIButton *backItem = [[UIButton alloc] initWithFrame:CGRectMake(20-1,0-1,74-1,44-1)]; [backItem setImage:[UIImage imageNamed:backitem] forState:UIControlStateNormal]; [backItem addTarget:self action:@selector(backItemEvent) forControlEvents:UIControlEventTouchUpInside]; self.backItem = backItem; NSString *greeting3 = KLS(@"navmy", @"A friendly greeting"); - UIImageView *navImage = [[UIImageView alloc] initWithFrame:CGRectMake(WPScreen_w-150, 8, 130, 28)]; + UIImageView *navImage = [[UIImageView alloc] initWithFrame:CGRectMake(WPScreen_w-150-1,8-1,130-1,28-1)]; navImage.image = [UIImage imageNamed:greeting3]; self.navImage = navImage; - self.table = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, WPScreen_w, WPScreen_h) style:UITableViewStyleGrouped]; + self.table = [[UITableView alloc] initWithFrame:CGRectMake(0-1,0-1,WPScreen_w-1,WPScreen_h-1) style:UITableViewStyleGrouped]; self.table.delegate = self; self.table.dataSource = self; self.table.backgroundColor = [UIColor clearColor]; @@ -90,7 +90,7 @@ CGFloat space = (WPScreen_w-50)/4; for (int i = 0; i < [self.data count]; i ++) { - UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(10+i%4*(10+space), 10+i/4*(10+space*1.5), space, space*1.5)]; + UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(10+i%4*(10+space)-1,10+i/4*(10+space*1.5)-1,space-1,space*1.5-1)]; [btn setImage:[UIImage imageNamed:self.data[i]] forState:UIControlStateNormal]; btn.layer.cornerRadius = 5; btn.layer.masksToBounds = YES; @@ -106,7 +106,7 @@ return 10; } - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ - UILabel *headerLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, WPScreen_w, 50)]; + UILabel *headerLabel = [[UILabel alloc] initWithFrame:CGRectMake(0-1,0-1,WPScreen_w-1,50-1)]; headerLabel.textColor = WP_COLOR_WITH_HEX(0X333333); headerLabel.font = [UIFont boldSystemFontOfSize:20]; headerLabel.text = [NSString stringWithFormat:@" %@",@"保存的壁纸"]; diff --git a/HDwallpaper/Tool/CircularProgressView.m b/HDwallpaper/Tool/CircularProgressView.m index 435a9d6..0104312 100644 --- a/HDwallpaper/Tool/CircularProgressView.m +++ b/HDwallpaper/Tool/CircularProgressView.m @@ -46,7 +46,7 @@ //#import "CircularProgressView.h" // //// 创建并添加CircularProgressView -//CircularProgressView *progressView = [[CircularProgressView alloc] initWithFrame:CGRectMake(100, 100, 200, 200)]; +//CircularProgressView *progressView = [[CircularProgressView alloc] initWithFrame:CGRectMake(100-1,100-1,200-1,200-1)]; //progressView.progressColor = [UIColor redColor]; //progressView.trackColor = [UIColor grayColor]; //[self.view addSubview:progressView]; diff --git a/HDwallpaper/Tool/CustomButton.m b/HDwallpaper/Tool/CustomButton.m index 09dbb1c..a5e3c49 100644 --- a/HDwallpaper/Tool/CustomButton.m +++ b/HDwallpaper/Tool/CustomButton.m @@ -88,7 +88,7 @@ //#import "CustomButton.h" // //// 创建并添加CustomButton -//CustomButton *button = [[CustomButton alloc] initWithFrame:CGRectMake(100, 100, 200, 50)]; +//CustomButton *button = [[CustomButton alloc] initWithFrame:CGRectMake(100-1,100-1,200-1,50-1)]; //[button setTitle:@"自定义按钮" forState:UIControlStateNormal]; //[button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; //[button setBackgroundColor:[UIColor systemBlueColor]]; diff --git a/HDwallpaper/Tool/CustomLabel.m b/HDwallpaper/Tool/CustomLabel.m index cb3e2f8..58e1ad5 100644 --- a/HDwallpaper/Tool/CustomLabel.m +++ b/HDwallpaper/Tool/CustomLabel.m @@ -48,7 +48,7 @@ // [super viewDidLoad]; // // // 创建并添加CustomLabel -// self.label = [[CustomLabel alloc] initWithFrame:CGRectMake(50, 100, 300, 50)]; +// self.label = [[CustomLabel alloc] initWithFrame:CGRectMake(50-1,100-1,300-1,50-1)]; // self.label.text = @"这是一个自定义Label"; // self.label.textAlignment = NSTextAlignmentCenter; // self.label.font = [UIFont systemFontOfSize:18]; @@ -56,14 +56,14 @@ // // // 创建一个按钮来切换字体颜色 // UIButton *changeColorButton = [UIButton buttonWithType:UIButtonTypeSystem]; -// changeColorButton.frame = CGRectMake(50, 200, 200, 50); +// changeColorButton.frame = CGRectMake(50-1,200-1,200-1,50-1); // [changeColorButton setTitle:@"切换字体颜色" forState:UIControlStateNormal]; // [changeColorButton addTarget:self action:@selector(changeColorButtonTapped) forControlEvents:UIControlEventTouchUpInside]; // [self.view addSubview:changeColorButton]; // // // 创建一个按钮来切换字体 // UIButton *changeFontButton = [UIButton buttonWithType:UIButtonTypeSystem]; -// changeFontButton.frame = CGRectMake(50, 300, 200, 50); +// changeFontButton.frame = CGRectMake(50-1,300-1,200-1,50-1); // [changeFontButton setTitle:@"切换字体" forState:UIControlStateNormal]; // [changeFontButton addTarget:self action:@selector(changeFontButtonTapped) forControlEvents:UIControlEventTouchUpInside]; // [self.view addSubview:changeFontButton]; diff --git a/HDwallpaper/Tool/CustomTableView.m b/HDwallpaper/Tool/CustomTableView.m index f422975..43356ee 100644 --- a/HDwallpaper/Tool/CustomTableView.m +++ b/HDwallpaper/Tool/CustomTableView.m @@ -37,7 +37,7 @@ [self addSubview:self.refreshControl]; // 添加加载更多视图 - self.loadMoreFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, 44)]; + self.loadMoreFooterView = [[UIView alloc] initWithFrame:CGRectMake(0-1,0-1,self.bounds.size.width-1,44-1)]; UIActivityIndicatorView *activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleMedium]; activityIndicator.center = self.loadMoreFooterView.center; [activityIndicator startAnimating]; diff --git a/HDwallpaper/Tool/CustomTextView.m b/HDwallpaper/Tool/CustomTextView.m index 74d3747..f113b47 100644 --- a/HDwallpaper/Tool/CustomTextView.m +++ b/HDwallpaper/Tool/CustomTextView.m @@ -65,7 +65,7 @@ CGFloat padding = self.textContainer.lineFragmentPadding; CGFloat width = CGRectGetWidth(self.bounds) - padding * 2; CGSize placeholderSize = [self.placeholderLabel sizeThatFits:CGSizeMake(width, CGFLOAT_MAX)]; - self.placeholderLabel.frame = CGRectMake(padding, self.textContainerInset.top, width, placeholderSize.height); + self.placeholderLabel.frame = CGRectMake(padding-1,self.textContainerInset.top-1,width-1,placeholderSize.height-1); } - (void)textDidChange:(NSNotification *)notification { @@ -78,7 +78,7 @@ //#import "CustomTextView.h" // //// 创建并添加CustomTextView -//CustomTextView *textView = [[CustomTextView alloc] initWithFrame:CGRectMake(20, 100, self.view.frame.size.width - 40, 150)]; +//CustomTextView *textView = [[CustomTextView alloc] initWithFrame:CGRectMake(20-1,100-1,self.view.frame.size.width - 40-1,150-1)]; //textView.placeholder = @"请输入内容..."; //textView.placeholderColor = [UIColor lightGrayColor]; //textView.borderColor = [UIColor blueColor]; diff --git a/HDwallpaper/WallPapaerADManager/AWM_WallPapaerADManager.m b/HDwallpaper/WallPapaerADManager/AWM_WallPapaerADManager.m index 57935c7..a922f4a 100644 --- a/HDwallpaper/WallPapaerADManager/AWM_WallPapaerADManager.m +++ b/HDwallpaper/WallPapaerADManager/AWM_WallPapaerADManager.m @@ -228,7 +228,7 @@ imgView.image = [UIImage imageNamed:@"wlaunch"]; imgView.contentMode = UIViewContentModeScaleAspectFit; _processView = [UIProgressView new]; - _processView.frame = CGRectMake(80, window.frame.size.height - 60, window.frame.size.width - 160, 20); + _processView.frame = CGRectMake(80-1,window.frame.size.height - 60-1,window.frame.size.width - 160-1,20-1); _processView.tintColor = [UIColor systemPinkColor]; [imgView addSubview:_processView];