0

(please keep in mind im very new to xcode and swift) All im trying to do is create an outlet between my view container on my storyboard and my viewcontroller.swift file. I hold control drag a line between the container and the swift file i name the outlet i run the app no issues.

Everything seems fine so i change the masktobounds on the container to false and it gives me the error. Really not sure what is going on this seems to be happening even with different outlet names.

When the error occurs it switches to the debug navigator, selects a file, and highlights this line

- 0x1005ee588 <+44>:  brk    #0x1

hopefully thats of some use.

Im really stuck on this error any help or advice as to what exactly is going and possibly how to fix it would be appreciated Thank you.

ViewController.swift

import UIKit
import Firebase

class ViewController: UIViewController {

@IBOutlet weak var labelContainer: UIView!
override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a  nib.
    labelContainer.layer.masksToBounds = false
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}

}

I understand that this error has come up in other threads however the cause of which seems to be different so why is this marked as a duplicate?

XvKnightvX
  • 579
  • 7
  • 23
  • 2
    Please post your code, as of now one can only guess that you unwrapped a variable by force but it was nil. Without the code, atleast I am not sure how to give a solution to you :) – GoodSp33d Aug 06 '16 at 08:04
  • Thanks for the quick reply i just posted the code of my ViewController.swift file – XvKnightvX Aug 06 '16 at 08:27
  • Are you sure that your `IBOutlet` is connected to the Storyboard correctly? – kabiroberai Aug 06 '16 at 08:34
  • I added the outlet the way described in the question i dragged a line between the container and the ViewController.swift file and changed the name to labelContainer – XvKnightvX Aug 06 '16 at 08:50
  • @XvKnightvX http://stackoverflow.com/a/30009319/2303865 – Leo Dabus Aug 06 '16 at 09:25
  • I just read the answer you made on that post. Are you saying I should remove other outlets? I have already made sure if this the label container outlet is the only outlet connected to the container – XvKnightvX Aug 06 '16 at 09:36
  • @XvKnightvX If the IBOutlet is connected properly you can see a dot to the left of the `labelContainer`. If its not connected properly you will see an empty circle in its place in the view controller. – GoodSp33d Aug 06 '16 at 10:08

1 Answers1

-1

first way:

1)press cmd + shift + k for clean the preoject

second way :

2) windows -> Projects go to that path and delete derived data
Chirag Patel
  • 1,453
  • 1
  • 11
  • 21