[Solved] Im creating a facial recognition program and I am getting a Thread BAD EXECUTION error and I don’t know what to do

Either the personPic outlet isn’t connected, or the “stupidsonny” image isn’t getting found and loaded. It’s hard to tell which since they’re both being accessed on the same line. To help narrow it down, you could put a ! where you load the image: personPic.image = UIImage(named: “stupidsonny”)! 1 solved Im creating a facial recognition … Read more

[Solved] How to convert BarCodeKit Objective-C code into Swift?

Looking at the headers for BarCodeKit, I’d suggest you use the class method: + (instancetype)code39WithContent:(NSString *)content error:(NSError *__autoreleasing *)error; E.g. in Swift 4.2: do { let barcode = try BCKCode39Code.code39(withContent: string) // or use rendition with `withModulo43` parameter imageView.image = UIImage(barCode: barcode, options: nil) } catch { print(error) } 4 solved How to convert BarCodeKit … 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] 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] Changing the view color when comparing values

In your view controller you need to add UITextFieldDelegate which will allow you to access methods related to your text field. The top of your view controller should look like this: class ViewController: UIViewController,UITextFieldDelegate //set delegate to class You then need to set the delegate of your text field to self in viewDidLoad and add … Read more