first I have my custom view named FindFriendHeadPublish.h,which contains a xib file as follows,I have set the autolayout,and the view is OC
![enter image description here](https://i.stack.imgur.com/lXr2v.png)

and my view controller which named PreviewViewController.swift also has a xib
and I add the FindFriendHeadPublish view to the view controller, but the autolayout in the FindFriendHeadPublish doesn't work

```
    override func viewDidLoad() {
    super.viewDidLoad()
    self.title = "我的卡片预览"
    var addpreviewView = NSBundle.mainBundle().loadNibNamed("FindFriendHeadPublish", owner: nil, options: nil)
    var previewView = addpreviewView.last as! FindFriendHeadPublish
    previewView.setTranslatesAutoresizingMaskIntoConstraints(false);
    GetUserInfoInterface.getUserInfoWithFUid(UserInfoSaveUtil.getUserInfo().userid, withBlock: { (userInfo:GetUserInfoVo!  , error:NSError! ) -> Void in

})

self.scrollView.contentSize = CGSizeMake(320, 640)
self.scrollView.addSubview(previewView)

}

```

I have check some other problems , but I haven't find a solution, any one can help, thank you

further more, the custom view works well in another viewcontroller which write in OC

and the code above works as follows
![enter image description here](https://i.stack.imgur.com/9gaR4.png)