iphone - 您如何在 Xcode 中检测 iOS 上的日期

标签 iphone objective-c ios xcode ipad

您好,我正在编写一款应用程序,其中包含一项竞赛。

UIAlertView *alert = [[UIAlertView alloc]

                      initWithTitle:@"Icon Contest!"
                      message:@"Design a 1024 x 1024 pixels icon for Example. The best one will be on the app's icon! Send them to: example@example.com."
                      delegate:self
                      cancelButtonTitle:@"More Info"
                      otherButtonTitles:@"Yes",@"No", nil];

[alert show];

我有一个截止日期,我想让应用在 1 月 31 日结束时显示不同的提醒。

最佳答案

[NSDate date] 返回当前日期。
使用 NSDateComponent可以从 NSDate 中获取月份和日期等详细信息。

关于iphone - 您如何在 Xcode 中检测 iOS 上的日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13827532/

相关文章:

iPhone:图像查看图片大小限制

iphone - iPhone 中的自定义字体

ios - iOS 屏幕共享 SDK

ios - 蒙版图像并填充颜色

ios - UICollectionView 的 viewDidLoad 大小不正确

iphone - 将 UIViewController xib 加载到 Storyboard 中的 ContainerView

ios - 我可以使用什么服务在 IOS 上快速发送推送通知

objective-c - 对象指针问题

ios - 线程阻塞 Objective C

ios - 为什么使用self.propertyname而不是_propertyname设置我的属性为零