ios7

iOS how to call a method on the minute, every minute

大城市里の小女人 提交于 2020-02-05 05:38:37
问题 I mean 12:01:00, 12:02:00 ... In iOS7, I want to call a method when minute of time is changed. In other words, if now is 01:55:47, then I want to call a method at 01:56:00 -> 01:57:00 -> 01:58:00 ... All I found about call a method is just about TimeInterval, but not I want. I've tried this code: NSTimeInterval roundedInterval = round([[NSDate date] timeIntervalSinceReferenceDate] / 60.0) * 60.0; NSDate *date = [NSDate dateWithTimeIntervalSinceReferenceDate:roundedInterval]; NSTimer *timer =

Login Failure Still Segues to Next View Controller

99封情书 提交于 2020-02-05 05:18:07
问题 Though I've successfully done this before, I can't figure it out this time. I've got a basic login screen as the first VC loaded upon launch. Successful login (appropriate username/password combo from database) does appropriately allow access without any alerts. However...any incorrect combination (or no username/password at all, for that matter), results in my desired alertView, but the next VC loads anyway. What am I doing wrong? There should be no segue at all upon failure, just an alert.

ios Pass data between navigation controller

久未见 提交于 2020-02-05 04:02:25
问题 I'm having a bit of a problem with my app, I have these view controllers below: I have the locations view controller with an array of locations and I have a locations array in the Menu Table view controller, I need to pass the array from Locations to Menu Table, but I dont know how, can somebody Help me? I have tried this coding below: -(void)pushMenuTableView { UIStoryboard *storyboard = self.storyboard; UINavigationController *menuTableController = (UINavigationController *)[storyboard

SpriteKit SKScene add AVCaptureVideoPreviewLayer CALayer as background not working

柔情痞子 提交于 2020-02-04 05:24:33
问题 I'm attempting to add the AVCaptureVideoPreviewLayer CALayer as the background to my SKScene. I can add the CALayer to the scene, but no matter what attempts at ordering the CALayer is always the top most object. In the didMoveToView I have the function: - (void) didMoveToView:(SKView *)view { [self addVideo]; } Which calls the addVideo function: -(void) addVideo { AVCaptureSession *captureSession = [[AVCaptureSession alloc] init]; captureSession.sessionPreset = AVCaptureSessionPresetHigh;

Working implementation of slide up/down transition using UINavigationControllerDelegate on iOS7

半城伤御伤魂 提交于 2020-02-02 08:36:47
问题 I've been spending some time trying to sort out custom transition animations available in iOS 7. According to this question, UINavigationControllerDelegate is the way to go. There are, however, no examples or documentation describing how best to approach a simple vertical transition in iOS7. (There are a plethora of other transition styles using UINavigationControllerDelegate, but none as simple as sliding the view up and down -- there are others that suggest just modifying the view position,

iOS7 XIB issue. blank space at top and bottom

╄→尐↘猪︶ㄣ 提交于 2020-02-02 01:32:51
问题 I am having a view on which I am setting an ImageView. Auto layout is checked. It looks good in the preview, but when app actually runs on the simulator, there is blank space is showing at the top as well as bottom only in the iPHone retina 4 inch simulator. on 3.5 inch it looks fine. Using iOS7 and XCODE 5. Even though i removed image from view, still there is the same problem. What can be reason for this blank space ? 回答1: I think are you Forget to adding splash screen Default-568h@2x.png

AFNetworking 2.0 Reachability not working

流过昼夜 提交于 2020-02-01 05:07:18
问题 I'm having some trouble making AFNetworking Reachability module to work. I have setup my AFHTTPRequestOperationManager with a ReachabilityStatusChangeBlock but it's never being called. self.manager = [[AFHTTPRequestOperationManager alloc] initWithBaseURL:[NSURL URLWithString:@"http://192.168.1.2:3000"]]; self.manager.responseSerializer = [AFJSONResponseSerializer serializer]; NSOperationQueue *operationQueue = self.manager.operationQueue; [self.manager.reachabilityManager

UILabel render text incorrectly in IOS7

不羁岁月 提交于 2020-01-31 12:31:05
问题 I use following code to calculate the bound of a UILabel CGRect bound = [lblName.text boundingRectWithSize:(CGSize){206, 99999} options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:stringAttributes context:nil]; The UILabel is a embedded in a UIScrollView , which is a subview of UITableViewCell . here what i got I made a test which use a UILabel in a table cell, and a UILabel in UIScrollView separately, and results are as I expected Note that all setting

CLLocationManager Delegate methods are not getting called

不羁的心 提交于 2020-01-30 05:06:01
问题 I am using CLLocationManager class. I have a simple class method for capturing the location +(void)captureLocation{ mLocationManager = [[CLLocationManager alloc]init]; mLocationManager.delegate = (id<CLLocationManagerDelegate>)self; mLocationManager.desiredAccuracy = kCLLocationAccuracyBest; [mLocationManager startUpdatingLocation]; } and i have the delegate methods of CLLocationManager also - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error { } - (void

How to change the unselected tabbaritem color in iOS7?

扶醉桌前 提交于 2020-01-29 04:11:42
问题 Before iOS 7 I used [[UITabBar appearance] setTintColor:[UIColor redColor]]; But now it only paint the selected item, I have read some suggestions but I can not fin how to do it, I used this too: [self.tabBarItem setFinishedSelectedImage:[UIImage imageNamed:@"openbookwp4.png"] withFinishedUnselectedImage:[UIImage imageNamed:@"openbookwp4.png"]]; this put the icon I want, with the color I want, but only after I selected that tab for example, when I open the app the tab looks normal, but after