cemolcay / MaterialCardView

Create material design cards quick and easy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swift 2

raphamzn opened this issue · comments

Hello,

I sent my application using the card material to Apple Store and has been approved, but the download and run the same closes without reasons.

The problem does not occur in the simulator and in my development phone.

To reproduce the error you must generate a version of app.ipa on ad hock mode and install on your phone that the error occurs.

The error is in the method:
func defaultInit () {
h = 0
appeareance = defaultAppeareance()

    contentView = UIView(superView: self)
    addSubview(contentView)
}

I need help!!!
Thanks.

I cloned the project and opened it in XCode 7.1. I was immediately presented with an error for your required initializers. Maybe that was the problem? I've fixed it. This is my first time using GitHub. I committed the change to master. I hope that works.

I solved this error with change in lifecycle:

// MARK: Lifecylce
override init (frame : CGRect) {
    super.init(frame : frame)

    contentView = UIView(superView: self)
    defaultInit()
}

convenience init () {
    self.init(frame:CGRect.zero)
}

required init(coder aDecoder: NSCoder) {
    fatalError("This class does not support NSCoding")
}

func defaultInit () {
    h = 0
    appeareance = defaultAppeareance()
    addSubview(contentView)
}