我要做的是,当用户点击页面上的某个位置时,包含随机图像的div将显示在点击位置并保持在那里.这必须能够重复,每次都显示不同的图像.有什么建议?
我正在尝试使用设置包来安排UILocalNotification.在设置中,您可以选择是希望每天(1 /天),每2天1次,仅在星期日或从不通知.
这是我使用的代码(这是在AppDelegate.m中):
-(void)defaultsChanged:(NSNotification *)notification {
[[UIApplication sharedApplication] cancelAllLocalNotifications];
[[NSUserDefaults standardUserDefaults]synchronize];
NSString *testValue = [[NSUserDefaults standardUserDefaults] stringForKey:@"multi_preference"];
NSLog(@"%@", testValue);
NSDate *today = [NSDate date];
NSCalendar* calendar = [NSCalendar currentCalendar];
NSDateComponents* compoNents = [calendar components:NSYearCalendarUnit|NSMonthCalendarUnit|NSDayCalendarUnit fromDate:today]; // Get necessary date components
[compoNents month];[compoNents day];
NSDictionary *dictToday= [self getDataFromdate : [compoNents day] month:[compoNents month]];
if ([testValue isEqualToString:@"one"]){
UILocalNotification* localNotification = [[UILocalNotification alloc] init];
localNotification.fireDate = [[NSDate date]dateByAddingTimeInterval:20];
localNotification.alertAction = @"View";
localNotification.alertBody = [dictToday objectForKey:@"saint_description"];
localNotification.repeatInterval = NSDayCalendarUnit;
localNotification.timeZone = [NSTimeZone defaultTimeZone];
localNotification.applicationIconBadgeNumber …Run Code Online (Sandbox Code Playgroud) 我已经看到iOS 7在设计方面带来了一些很酷的功能,我想知道我是否可以让键盘变得透明,就像我在一些应用程序中看到的那样.如果是这样,我该怎么办?
我做了一些研究,但没有找到太多相关信息.
ios ×2
cocoa-touch ×1
css3 ×1
html5 ×1
ios7 ×1
javascript ×1
jquery ×1
objective-c ×1
uikeyboard ×1