[Solved] Is there any way to making transition without storyboard?

I solve my problem. I just add that code for calling animation transition in my homecontroller: extension HomeController: UIViewControllerTransitioningDelegate { func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? { return faceanim() } func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { return faceanim() } } And to button action is: @objc func handleAccount() { let … Read more

[Solved] Does dateFromServer return the current Timezone of the person?

LastCommunicationDate is a string, but you are converting it to a Double. Try this instead: let lastCommunicationDate = “2022-01-21T10:58:21.367” //Create dateformatter to convert string to Date let isoDateFormatter = ISO8601DateFormatter() isoDateFormatter.formatOptions = [ .withFullDate, .withTime, .withColonSeparatorInTime, .withFractionalSeconds ] let isoDateFormatter2 = ISO8601DateFormatter() isoDateFormatter2.formatOptions = [ .withFullDate, .withTime, .withColonSeparatorInTime ] let date = isoDateFormatter.date(from: lastCommunicationDate) ?? … Read more

[Solved] objective-c Parameters not passes properly

I think you have asked the same question else where. So here is the answer which also applies here. I found a few things that should be changed in your code. Here is what I did to make your swap function work. This is the function: -(void) swapCharacters: (NSMutableString *)set withInteger: (int)first andInteger: (int)second{ NSLog(@”swap: … Read more

[Solved] Objective-C Fast Enumeration: checking for BOOL

NSPredicate *predicate = [NSPredicate predicateWithFormat:@”wasRead = YES”]; NSArray *arr = [array filteredArrayUsingPredicate:predicate]; Can sort a thousand objects in 0.0004 seconds. Then just do: for (NSDictionary *object in arr) { //Statements } Edit: actually after further experimentation, using fast-enumeration is about four times faster, about 0.0001, which if scaled to 100000 objects can be much, much … Read more

[Solved] how to create login screen for iPhone Xcode [closed]

if([_txt_username.text isEqual:@”rotanet”] && [_txt_username.text isEqual:@”rotanet”]){ UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@”Storyboard” bundle:nil]; ViewController* viewController = [storyboard instantiateViewControllerWithIdentifier:@”ViewController”]; [self presentModalViewController: viewController animated: YES]; } 2 solved how to create login screen for iPhone Xcode [closed]