[Solved] in the ViewController.m, what’s the difference between self.username with _username [duplicate]

The self.username will call the setter of the username that’s why the breakpoint jumps to the synthesize statement. When you a _variable, then the property can be accessed using the _variable. And in your case: self.username stores the value to ivar _username and _username = @”admin”; is also stores the value to _username ivar. Means … Read more

[Solved] Post request in swift with encodable [closed]

This JSON is wrong. You JSON must be valid. In order to make above JSON valid we need to set array with a key. Wrong { [{ “time”: 1, “score”: 20, “status”: true, “answer”: 456 }], challenge_date”: “2019-03-13” } Correct { “array”: [{ “time”: 1, “score”: 20, “status”: true, “answer”: 456 }], “challenge_date”: “2019-03-13” } … Read more

[Solved] How can I compare the current time with a specific time?

Don’t use a label to hold information. Save the date at the moment you set your label’s text, as a Date, into your model (or simply as a property in your view controller.) Then, when you need to tell If the “label time” is before or after 4:00PM, use the Calendar method date(bySettingHour:minute:second:of:matchingPolicy:repeatedTimePolicy:direction:) to generate … Read more

[Solved] The iPhone app closes immediately when I open the map [closed]

You need to add the google map API key on ios/Runner/AppDelegate.swift file import UIKit import Flutter import GoogleMaps @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { GMSServices.provideAPIKey(“GOOGLE_API_KEY”) GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } } 2 solved The iPhone app closes immediately when … Read more

[Solved] What is best way to create zip file and save to Documents in iOS [closed]

path for documents: NSString* _path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject] array with file names at _path folder NSError* _error; NSArray* _fileNames = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:_path error:&_error] for zipping try to use ZipZap: https://github.com/pixelglow/zipzap 40mb – is small file for this =) solved What is best way to create zip file and save to Documents in … Read more

[Solved] In self.storyboard?.instantiateViewController why self.storyboard is optional?

storyboard is optional because it’s possible to instantiate view controller another way, e.g. from xib or programmatically, link to docs; navigationController is optional since there can’t be one, obviously; as is used for type casting. All these answers can be found in documentation, it would be much faster to look there at first ? solved … Read more

[Solved] Auto Adjust UITextView and UITextField on appearance on keyboard [duplicate]

This is a fairly common problem, there are all sorts of solutions to it. I put one together and made it part of my EnkiUtils package which you can download from https://github.com/pcezanne/EnkiUtils Short version: You’ll want to watch for keyboard events and call the Enki keyboardWasShown method, passing it the current view (and cell if … Read more

[Solved] Programatically add “Spacing to nearest neighbour” constraint

I can’t constrain it to the specific button though because I don’t have IBOutlets and would rather not add them Then you are totally stuck. Your requirements are self contradictory. Without a reference to the button of some kind, you cannot possibly make a constraint to it programmatically. There is no “whoever my nearest neighbor … Read more

[Solved] How to acess @IBOutlet weak var

You can’t access it because it’s how it is designed (for now this info will be enough). What you need to do to access it: Create functions that will trigger your event when you need to do those checks for those certain conditions. In those functions you can access the Outlet. For example: add the … Read more

[Solved] iOS: How to show nearby hospitals in skobbler maps?

SKNearbySearchSettings* searchObject = [SKNearbySearchSettings nearbySearchSettings]; searchObject.coordinate = CLLocationCoordinate2DMake(currentLocation.coordinate.latitude, currentLocation.coordinate.longitude); searchObject.searchTerm=@””; //search for all POIs searchObject.radius = 5000; searchObject.searchMode=SKSearchHybrid; searchObject.searchResultSortType=SKProximitySort; searchObject.searchCategories = @[ @(SKPOICategoryHospital)]; [[SKSearchService sharedInstance] setSearchResultsNumber:10000]; [[SKSearchService sharedInstance]startNearbySearchWithSettings:searchObject]; Use this code for finding nearby hospitals. 0 solved iOS: How to show nearby hospitals in skobbler maps?