我在我的故事板中有视图控制器,带有提示文本行但是当我在导航栏中按下没有提示行的新视图控制器时,我在导航栏和视图控制器主视图之间得到了这个(见图片)黑色空间.

我已经尝试使用以下方法删除提示:
[self.navigationItem setPrompt:nil];
Run Code Online (Sandbox Code Playgroud)
但我仍然有这个问题.
我想从datePicker获取时间到NSDate对象,然后在这个时间每天运行一个方法.例如:用户将日期戳于08:00,并且每天08:00应用程序将运行一些方法.
非常感谢,Amir Foghel
我有一个使用本地通知的应用程序.现在当IOS5出来并显示通知警报时 - 它会进入通知中心,现在通过我的2个按钮显示警报(显示和取消).
有人可以帮我看看,所以我可以让它弹出屏幕而不是通知中心(屏幕顶部的行).
这是我的代码:
UILocalNotification *localNotif = [[UILocalNotification alloc] init];
localNotif.fireDate=[NSDate date];
localNotif.timeZone = [NSTimeZone defaultTimeZone];
localNotif.alertBody = @"Application alerted";
localNotif.alertAction = @"Show";
localNotif.soundName = UILocalNotificationDefaultSoundName;
localNotif.applicationIconBadgeNumber = 0;
[[UIApplication sharedApplication]presentLocalNotificationNow:localNotif];
[localNotif release];
Run Code Online (Sandbox Code Playgroud)
谢谢,阿米尔.
我有这个观点,他的大小是1280 X 345,我在屏幕上左右移动它.现在,我的主要问题是我如何用手指移动(不是swipeLeft/swipeRight)我希望它像iPhone IOS的主屏幕一样用我的手指移动.
现在,即时通讯使用此代码:
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInView:infoView];
//[self.view setTransform:CGAffineTransformTranslate(CGAffineTransformIdentity, (location.x + self.view.frame.origin.x - dx), 0.0)];
NSLog(@"touch: %f",location.x);
infoView.frame = CGRectMake(infoView.frame.origin.x + location.x, 0, 1280, 345);
}
Run Code Online (Sandbox Code Playgroud)
这应该是目前的方式,但我不能说出来.我也尝试在谷歌和这里找到答案,但是,如你所知..我没有找到有用的东西.
我也做了这个,所以你可以更好地理解它.

objective-c ×4
iphone ×3
cocoa-touch ×1
datepicker ×1
ios ×1
ios5 ×1
prompt ×1
swipe ×1
touch ×1
xcode ×1