Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Card View Not Showing #4

Open
winniepooh001 opened this issue Dec 21, 2016 · 0 comments
Open

Issue with Card View Not Showing #4

winniepooh001 opened this issue Dec 21, 2016 · 0 comments

Comments

@winniepooh001
Copy link

Hi,

Thank you for sharing the card view it looks very good. I'm having trouble to get the example working (I'm using Materials as well) card view is not showing. I did try to isolate and see if it is related to the cell, but if i just show the cell they will show in view. I'm doing it without storyboard. I'm not sure if i would be the cause of the problem. Only the first few lines of the code from example I changed just so that I can figure out why its not showing. However, I still couldn't figure out. It looks like objects were initiated under the card view, but the card view is not showing.

var card = CardView(frame: CGRect(x: 100, y: 200, width: 500, height: 500))

open override func viewDidLoad() {
    
    super.viewDidLoad()
    
    self.card.frame  = CGRect(x: 100, y: 200, width: 500, height: 500)
    self.card.backgroundColor = UIColor.red
    
    view.addSubview(self.card)
     self.card.cardDataSource = self
    self.card.registerCardCell(c: CardACell.classForCoder(), nib: UINib.init(nibName: "CardACell", bundle: Bundle.main))
   
    prepareToolbar()
    let arr = self.generateCardInfo(cardCount: 10)
    self.card.set(cards: arr)
    
    

    self.card.showStyle(style: .cover)
    //view.layout(card).horizontally().center()
    
    view.backgroundColor = UIColor.purple
    
   
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant