How to stop the countdown to 0? - Fast

I'm new at Swift and iOS development. I'm trying countdown for specific date. My iOS countdown app is counts negative after zero. I want stop at zero. How do I fix this? let currentDate = Date() let dateFormatter = DateFormatter() let userCalendar =

Swift: ++ is deprecated - the replaced code does not work

I know that "++" will be removed in Swift 3 and it has to be raplaced: += 1 but in this code, when I change to this value, I get error: override func viewDidLoad() { super.viewDidLoad() imageView.image = images[index++] animateImageView() } When

iTunes Connect - authorization error

Apps that use the entitlements [com.apple.developer.homekit] must have a privacy policy URL for [English, Turkish]. If your app doesn't use these entitlements, remove them from your app and upload a new binary. I didn't choose home kit entitlement in

How to return the method object inside the iOS block

Return type of method is NSArray, so when I call this method I get nil or empty array. Here it's below my method implementation: - (NSArray *)startParsing { __block NSArray *array; allProductsID = [[NSMutableArray alloc] init]; NSString *string = [NS

UICollectionView does not display all items

I am develop in Xamarin.iOs using MVVMCross to databind ObservableCollection to a MvxCollectionViewSource and the items are displayed in a UICollectionView. When setting the items to the ObservableCollection not all of them are shown in the UICollect

UITableView cell deletion with animation? iOS (Goal C)

I've searched around, it seems that most recommendations are to simply [tableView reloadData]. However, I am after animation on deletion of the cell. If you can imagine a checklist, I add items to the checklist and once the item/task on the checklist

Animate the drawing of CALayer with the animation of the spring

I want to animate drawing an arc onscreen but I want it to have the spring effect found in iOS 7's UIView animate... usingSpringDamping: API. I know I can use Core Animation directly by creating a CABasicAnimation but then I lose out on the nice spri

how to delete a line in UITabBar?

Help remove the line in tab bar! `[[UITabBar appearance] setBackgroundImage:[[UIImage alloc] init]];` - NOT WORK CODE: [[UITabBar appearance] setBarTintColor:[UIColor colorWithRed:54.0f/255.0f green:62.0f/255.0f blue:69.0f/255.0f alpha:1.0f]]; [[UITa

How to convert an NSString to an int

This question already has an answer here: Convert a string into an int 10 answers I want to compare 2 numbers. The user has to enter a code(here 1) in and Textfield in an ViewController. The entered number will be compared with each other if it match

UniqueIdentifier in ios 7

Before deprecation of uniqueIdentifier it was good to use same identifier even deleting app and even erasing iPhone. After that I use MAC address and that was also working before iOS 7, but with iOS 7 it gives 2c:00:00:00:00:00. So I am not getting a

Move to landscape orientation

I have an X-Code project where it is Portrait and it does not move from that. It is always on Portrait. How can I make it so that 1 page, by default, it is landscape? If you can go into as much detail as possible, that would be great. I am newer to X

Basic data that does not save objects persistently

I'm new to Core Data and as such am not sure if I'm making a mistake. I've downloaded some data from a REST API and it successfully saves the JSON response to disk. I'm trying to process the data and save it persistently using Core Data. NSLog(@"inse

How to render the area above UITableView transparent

My original necessary was to make the area above uitableview transparent and show the imageview under it, just like this: I know there are many ways to implement this effect and I just wonder why cells can be transparent and show the content under th

How to perform continuous orientation detection in ios?

I have is a simple if statement to detect an orientation and perform an action. This works well, but it only works the first time and it can't detect it again. Does this void only get called once and if so, how can I change this around to constantly

SBJSON ios 5 or native apple JSON

Just started using JSON in iOS. I have a previous version of an application that uses SBJSON. I am rebuilding it from the ground up, and was wondering if I should continue to use SBJSON or apple's native JSON support? ThanksSome people have done some

Get the title of the button that was hit

I have three buttons on my iPhone app and would like to programmatically access the title of the button that was touched.In your button's action method just use sender.currentTitle.

Return the user to my app after a phone call

I want the user to be able to call a phone number form within my app. Is it possible for the user to be returned straight back to the application after finishing the call?1: I guess that this is the default behavior, isn't it? 2: you can check if the

how to play sound by AVAssetReader

I am using AVAssetReader to get the individual frames from a video file. I would like to know how I can play the audio from Mp4 file. the return value of method [player play] is false, so there is no sound to play, but why thanks. create AVAssetReade