小编Geo*_*anu的帖子

单击时在光标位置旁边创建DIV

我要做的是,当用户点击页面上的某个位置时,包含随机图像的div将显示在点击位置并保持在那里.这必须能够重复,每次都显示不同的图像.有什么建议?

javascript jquery html5 javascript-events css3

14
推荐指数
1
解决办法
2万
查看次数

iOS UILocalNotification设置为每天触发一次,每两天触发一次,并且仅在星期日触发

我正在尝试使用设置包来安排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)

objective-c nsuserdefaults ios uilocalnotification

13
推荐指数
1
解决办法
1953
查看次数

使我的iOS 7应用程序中的键盘半透明/透明

我已经看到iOS 7在设计方面带来了一些很酷的功能,我想知道我是否可以让键盘变得透明,就像我在一些应用程序中看到的那样.如果是这样,我该怎么办?

我做了一些研究,但没有找到太多相关信息.

cocoa-touch uikeyboard ios ios7

6
推荐指数
1
解决办法
1万
查看次数