[Solved] Display Alert if tableView has no Results

You cannot check the row count in viewDidAppear because an asynchronous NSURLConnection is used to fetch the JSON data that populates the table view. The correct way is to call reloadData in connectionDidFinishLoading, after you have updated your data source with the response from the URL request. At that point you know if the number … Read more

[Solved] can xcode version name include alphabets

Try following the below steps quit Xcode. pod –version (if its not pls upgrade first). cd #top level source folder# pod cache clean —-all pod deintegrate || rm -rf pods pod install launch Xcode and open workspace and compile away. 1 solved can xcode version name include alphabets

[Solved] I’ve number of latitude and longitude in array. I want to display multiple markers in Google Map [closed]

First integrate Google Maps with the your app Google Maps iOS SDK Then try to add marker to the map Adding a Map with a Marker var marker = GMSMarker() marker.position = CLLocationCoordinate2D(latitude: -33.86, longitude: 151.20) marker.title = “Sydney” marker.snippet = “Australia” marker.map = mapView Finally use for loop to add multiple markers to the … Read more

[Solved] Xcode bugged project

I was going to recreate the project from scratch, but decided to start by recreating the files in the project first. I copied the code in LoginVC, deleted the file, created a new LoginVC, pasted the code back in, and the whole project runs as expected now. Breakpoints and code execute as expected throughout the … Read more

[Solved] Navigation bar with shadow & corner radius

Here is the code, // 1. Enable prefersLargeTitles and title self.navigationController?.navigationBar.prefersLargeTitles = true self.title = “Title” // 2. Add left, right bar buttons let leftBtn = UIBarButtonItem(title: “Edit”, style: .done, target: self, action: #selector(item)) let rtBtn = UIBarButtonItem(title: “Add”, style: .done, target: self, action: #selector(item)) self.navigationItem.rightBarButtonItem = rtBtn self.navigationItem.leftBarButtonItem = leftBtn //3. Change default navbar … Read more

[Solved] Display Locations on UITableview

What you want is geocoding. You can fairly easily integrate calls to Google’s Geocoding API in your app – simply take the user input from the UITextField, send it in a request to Google, and parse the data that you get back to populate the data source for your UITableView. Google will even provide multiple … Read more

[Solved] Image upload in iphone [closed]

first u have to get image form photo library for that use below code. – (IBAction)BrowseImage:(id)sender { if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeSavedPhotosAlbum]) { UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; imagePicker.mediaTypes = [NSArray arrayWithObjects: (NSString *) kUTTypeImage, nil]; imagePicker.allowsEditing = NO; [self presentModalViewController:imagePicker animated:YES]; //newMedia = NO; } } -(void)imagePickerControllerDidCancel:(UIImagePickerController *)picker … Read more

[Solved] Store string type array in RealM objective c

You can inherit from RLMObject class and put the NSString into your RLMObject as a property. Then you can make new RLMObject one more time, with a RLMArray of previously made RLMObject now. @interface StringObject: RLMObject @property NSString *stringValue; @end @interface RealmObject: RLMObject @property RLMArray<StringObject> *realmArray @end After this manipulation feel free to use it. … Read more