[Solved] Tool for counting total files,functions and number of lines in iphone application [closed]

for line of codes : find . “(” -name “.m” -or -name “.mm” -or -name “*.cpp” “)” -print0 | xargs -0 wc -l for number of files : //you need to write this code NSFileManager *filemgr = [NSFileManager defaultManager]; NSArray *filelist= [filemgr directoryContentsAtPath: yourPath]; int count = [filelist count]; NSLog (“%i”,count); for number of functions … Read more

[Solved] Accessing NSString from another .m file [closed]

I just put basic step here, change it as per your requirement. You just need to write @property (nonatomic, strong) NSString *userEMail; in your first.h file write second.h file @property (nonatomic, strong) NSString *gotUserEMail; And your first.m file you have gotUserEMail string with some value.. pass it to anotherViewController such liek, secondViewController *addView = [[secondViewController … Read more

[Solved] Is it possible to connect phones by rubbing them?

The closest thing to what you’re looking for is called Near Field Communication (or NFC). Currently fully supported by many Android phones without major limitations. Apple devices are more limited in NFC usage (currently restricted to Apple Pay only). For more information, read Near field communication (Wikipedia). solved Is it possible to connect phones by … Read more

[Solved] Unable to convert this Swift 2 code to Swift 3

That line should have failed under any version of Swift for being so unwieldily. First off, safely unwrap the optional. And only use one cast at the end. func isLight() -> Bool { if let components = self.cgColor.components { let brightness = CGFloat((components[0] * 299 + components[1] * 587 + components[2] * 114) / 1000) … Read more

[Solved] I want to flip my screen [closed]

You can use UIViewAnimation that flip your screen. [UIView transitionWithView:self.navigationController.view duration:0.5 options:UIViewAnimationOptionTransitionFlipFromLeft animations:^{ [self.navigationController popViewControllerAnimated:NO]; //for go back to previous view controller //otherwise set your view controller if you want go to next screen } completion:NULL]; For flip from right set this option UIViewAnimationOptionTransitionFlipFromRight solved I want to flip my screen [closed]

[Solved] Swift 4 pop to a view controller : navigation method [closed]

Make sure your controller is in the navigation stack and you can try this code. for controller in self.navigationController!.viewControllers as Array { if controller.isKind(of: SOListScreen .self) { self.navigationController!.popToViewController(controller, animated: true) break } } 1 solved Swift 4 pop to a view controller : navigation method [closed]

[Solved] How To multiple Euro values total arrays in ios Swift 5 Like [“£179.95”, “£199.95”, “£89.95”]

If you’re sure that the strings contained in your array always start with a £, you could do this: let sum = array.compactMap { Double($0.replacingOccurrences(of: “£”, with: “”)) } .reduce(0.0, { $0 + $1 }) Example: let array = [“£179.95”, “£199.95”, “£89.95”] let sum = array.compactMap { Double($0.replacingOccurrences(of: “£”, with: “”)) } .reduce(0.0, { $0 … Read more

[Solved] Swift How can i take data from custom uicollectionviewcell?

Question: “I should take textfield value from the cell. how can I do that?” Answer: You shouldn’t do that. View objects are for displaying information to the user and for collecting input, not for storing data. This is especially important for UICollectionViews and UITableViews, since both of those create and recycle cells as needed as … Read more