[Solved] How to wait core data add functions step by step in swift 3

try using completion handler for your function or may try Operation queue with dependency to wait coreDataAdd (where : “User”, onCompletion: { (isFinished) in if isFinished { coreDataAdd (where : “Profile”, onCompletion: { (isFinished) in if isFinished { coreDataAdd (where : “Profile”, onCompletion: { (isFinished) in if isFinished //Here segue to the next view let … Read more

[Solved] date not showing in correct manner

Try to change like this: In ViewDidload: firstdate = [[NSCalendar currentCalendar] dateByAddingUnit:NSCalendarUnitDay value:-6 toDate:[NSDate date] options:nil]; // And below method -(void)dateChange { NSArray *labelArray = @[flabel, slabel, tlabel, folabel, fivlabel,sixlabel,sevenlabel]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; NSCalendar *calendar = [NSCalendar currentCalendar]; dateFormatter.dateFormat = @”ddMMM”; for (NSInteger i = 0; i < 7; ++i) { NSDate … Read more

[Solved] How to change UIPickerView image

i have tried this code [[[self._picker1 subviews] objectAtIndex:3] setAlpha:0.0]; // this view contains the background so you can change it with your new background // object at index 4 is your labels or images so they must be shown [[[self._picker1 subviews] objectAtIndex:5] setAlpha:0.0]; [[[self._picker1 subviews] objectAtIndex:6] setAlpha:0.0];// this is you indicator , you can add … Read more

[Solved] Refresh or reload data in function ViewWillAppear not always working in UITableViewcontroller

There are two things you should consider. First reload data will be called right away after reloadTransaction() if your url request hasn’t processed yet, it will show an empty tableView. Second, when you have new data make sure to call the main thread before you call self.tableView.reloadData(): internal func reloadTransaction(){ self.transactionList.removeAll() //get URL response and … Read more

[Solved] is there a way to measure Swift’s performance without building UI on iPhone with Xcode 11? [closed]

This is an example of how to measure the time of a sum of numbers let numbersArray = [1,2,3,4,5,6,7,8,9,1,2,3,4,5,6] func showBenchmarkTime(title:String, operation:()->()) { let startTime = CFAbsoluteTimeGetCurrent() operation() let timeElapsed = CFAbsoluteTimeGetCurrent() – startTime print(“Time elapsed for \(title): \(timeElapsed) s.”) } showBenchmarkTime(title: “sum an array of numbers”) { print(numbersArray.reduce(0, +)) } solved is there a … Read more

[Solved] unrecognized selector sent to instance in Array [duplicate]

Your problem is that the compiler thinks you’ve declared “m_ArrContactsOrgEntity” as something other than a NSMutableArray. Otherwise, you wouldn’t be seeing that “unrecognized selector” error. Another hint of advice for you, best practice in Objective-C is that variables should always start with lower case letters. Change “ObjIstructContacts“, “Qnarray” and “Qnstream” to start with lower case … Read more

[Solved] what is the BEST way to populate several tables with different data on one view? [closed]

An easier way than BalaChandra’s answer(that it´s correct): I suppose your UITableViews are instance variables (or even properties). So if you have instantiated your table views like: UITableView *tableViewA = [[UITableView alloc] init…]; UITableView *tableViewB = [[UITableView alloc] init…]; for example, you don’t need setting the tag to the tableviews. In the UITableViewDelegate/UITableViewDataSource methods you … Read more

[Solved] Error in IOS App – Expected Identifier

The line before your error should have – (void)viewDidLoad and you should only call [super viewDidLoad] once. Move anything in your other viewDidLoad to this new method and delete your other viewDidLoad. For example: – (void)viewDidLoad { **This is where the error Expected identifier or “(” occurs** [super viewDidLoad]; [viewWeb setDelegate:self]; // Moved from previous … Read more

[Solved] 2017-08-16 05:08:54 Convert String to in Date “17-Aug 13 : 30” using swift 3

The input is yyyy-MM-dd hh:mm:ss and the output is dd-MMM HH:mm.So do like let outFormatter = DateFormatter() // set the input format outFormatter.dateFormat = “yyyy-MM-dd hh:mm:ss” // convert your string to date let date = outFormatter.date(from: “2017-08-16 05:08:54”)! // set the output format outFormatter.dateFormat = “dd-MMM HH : mm” // convert your date to expected … Read more

[Solved] New to iOS development. Need Resources [closed]

Tack a look at video tutorial of Lynda. Its good to take a look at that video and than start developing app in iPhone. For good tutorial my favorite sites are Raywenderlich, EDUMobile, mobileTutPlus, Technotopia. And for sample code i suggest GITHub, Cocoacontrols, Code4app. And this is really helpful books, Programming in Objective-C 2.0 (2nd … Read more