Categories
Mastering Development

Getting error from else block everytime in app but in postman it is working fine [closed]

When I am executing this program it gives me an error Account does not exists this means executing else block everytime but I tried this in Postaman with same user_id and password it is working fine it shows me user logged in . IO doesn’t know why this is happening help me solve this problem […]

Categories
Mastering Development

Present New Storyboard Programmatically

I’m trying to present an onboarding flow programmatically when the app is launching, but the segue to the Onboarding Storyboard’s OnboardingInitialVC is not occurring. Here’s my code: extension UIViewController { func presentOnboardingFlow() { let storyboard = UIStoryboard(name: "Onboarding", bundle: nil) let vc = storyboard.instantiateViewController(withIdentifier: "OnboardingInitialVC") present(vc, animated: true, completion: nil) } } I’m calling this […]

Categories
Mastering Development

How to pause or stop iframe and html5 video on tab change

I have a piece of code, where tabs contains different videos. The problem is, on changing the tab the video keeps on playing. I want it to stop playing when the tab is changed. What I want to achieve is this https://dramasq.de/kr201012/63.html What I achieved so far is placed here, http://mento.xyz/demo.html <!DOCTYPE html> <html> <head> […]

Categories
Mastering Development

Argument passed to call that takes no arguments in Xcode

I have a UITableViewCell and when I’m running the code below,the codes that were running suddenly gave 3 error. I wrote the problem lines on the code but How can I solve this problem? UITableViewCell: import UIKit import MapKit import Firebase import CoreLocation import SDWebImage class anasayfaCell: UITableViewCell, MKMapViewDelegate, CLLocationManagerDelegate{ @IBOutlet weak var kullaniciAdiLabel: UILabel! […]

Categories
Mastering Development

Function from another class ios swift not executed

Please tell me, I have 2 classes. There is a load_shop() function that enables the display of the webView. If I call a function from the first class ViewController then the function is executed and the webView is displayed, and if from another class CheckUpdate the function is executed (print is output) but the webView […]

Categories
Mastering Development

How to add close or back button in Xcode using swift language when a file such as pdf, ppt .. etc. is opened?

First of all I’m new in swift and objective c languages. My problem is that I have a WebView app for iOS device using swift language , the app when opens a document file such as pdf, ppt,…etc. there is no option to close the file or back to previous. Just googled the problem and […]

Categories
Mastering Development

iOS – NFCTagReaderSessionDelegate in Swift which is called from objective-c does not call tagReaderSession

we develop iOS apps with cross compiled sources from Java with j2objc. So the most parts of the app are in objective-c. Some features like NFCTag reading have to be implemented native for a new App I decided to implement the NFCTagReaderSessionDelegate in swift. To test it I implemented a custom UIButton which on press […]

Categories
Mastering Development

When code is in loadView: Could not execute support code to read Objective-C class data in the process

Say I create a tableView in navigation controller programmatically. After removing storyboard file and its reference. I put all UI initialization and constraints code into loadView() as below code. Running with real device, but the table view is not showed up, and soon this waring pops up. If I put those code in viewDidLoad, everything […]

Categories
Mastering Development

UIImagePickerController must be used from main thread only | app crash

Hi everyone I am implementing UIImagePickerController in iOS 14. When the user selects the camera my app crashes when the user agrees to use the camera, returning this error in purple on xcode – [UIImagePickerController init] must be used from main thread only How can I solve this problem? thanks everyone for the advice private […]

Categories
Mastering Development

Trimmed swift video only saving untrimmed video Xcode 12 Swift 5

I have set up a simple "record" UIButton, where I am taken to the camera, can record video only, and after taking the video, am taken to the video editor screen where I can trim. Once trimmed, I hit save and the video successfully saves to my camera roll. However, it is only saving the […]