Categories
Mastering Development

I can’t set my label using delegate function. I am getting the data from didSelectRow. However I can’t set the label?

So I am new to protocols and delegate. However I tried to use one in my project after learning about it. I’m not sure if I did anything wrong. But I can’t update the label. import UIKit class CountryVC: UIViewController { //MARK:-Properties let deathLabel: UILabel = { let label = UILabel() label.textColor = .black label.textAlignment […]

Categories
Mastering Development

How to download .icloud files in folder accessed via UIDocumentPickerViewController?

I’m trying to use UIDocumentPickerViewController to get access to all files within an iCloud directory as described in this Apple documentation. let documentPicker = UIDocumentPickerViewController(documentTypes: [kUTTypeFolder as String], in: .open) documentPicker.delegate = self present(documentPicker, animated: true, completion: nil) extension FileViewController: UIDocumentPickerDelegate { func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) { guard let url = urls.first […]

Categories
Mastering Development

Sign Email in Simulator doesnt appear

Sign with Email in Simulator doesnt appear when i clicked the button login, i have added firebaseApp.configure() in AppDelegate and i have tried anything that makes it works but if the verification on Firebase web doesnt work what does it get wrong? import UIKit import FirebaseUI import Firebase class ViewController: UIViewController { override func viewDidLoad() […]

Categories
Development

How to pick, display two images on two UIImageViews, and then upload these two chosen images to Firebase Database and Storage?

I want to pick two different images on two imageView’s on one ViewController, display them, and after pushing the button save picked images to firebase database and storage to its particular user. My code only able to upload one picked image, not two different, I understand that the problem with UIImagePickerController part, but how can […]

Categories
Development

UIPageViewController where to implement setViewControllers(..:) method

So I have a UIPageViewController where I want to implement the spineLocation to be .mid if the device is in landscape and .min for portrait, therefore showing two controllers in landscape and one in portrait. In the page view controller delegate I implemented this function: func pageViewController(_ pageViewController: UIPageViewController, spineLocationFor orientation: UIInterfaceOrientation) -> UIPageViewController.SpineLocation { […]

Categories
Development

UICollectionView is not reloading search results even with reloadData

I can get the search feature to filter out the results but it won’t display those searched results on the iPhone emulator. It displays the results on the iPhone I have (iPhone 5) but not on the emulator. I don’t know why they collection view is not updating while I type. The items in the […]

Categories
Development

Remove ALL whitespace from borders in matplotlib imshow

I am trying to animate a set of plot but for some reason the methods for removing whitespace from plot borders in images generated by imshow() are not working. Here are some examples and the images that result: figsize=(10,10) fig, ax = plt.subplots(figsize=figsize) fig.tight_layout() fig.subplots_adjust(left=0, bottom=0, right=1, top=1, wspace=None, hspace=None) img = ax.imshow(np.random.normal(0,2,(200,200)), animated = […]

Categories
Development

How to convert the PHAsset type to URL in didfinish method of OpalImagePicker in Swift?

I am retrieving the videos from albums in PHAsset format using OpalImagePicker() and trying to convert into URL format but it is not working properly and getting into else loop. @IBAction func gallery(_ sender: Any) { let imagePicker = OpalImagePickerController() imagePicker.imagePickerDelegate = self imagePicker.allowedMediaTypes = Set([PHAssetMediaType.video]) imagePicker.maximumSelectionsAllowed = 4 self.present(imagePicker, animated: true, completion: nil) } […]

Categories
Development

push data from UITableView to view controller programmatically

I am trying to push data from a tableView to a View controller. I can successfully transfer some of the data over, but I am still missing some key points. I will try to illustrate my question to the best of my abilities. In my notificationTableView, I have data that is stored such as a […]

Categories
Development

push data from UITableView to view controller programmatically

I am trying to push data from a tableView to a View controller. I can successfully transfer some of the data over, but I am still missing some key points. I will try to illustrate my question to the best of my abilities. In my notificationTableView, I have data that is stored such as a […]