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

Example of a custom view cell #33

Open
kpmaalej opened this issue Oct 2, 2012 · 6 comments
Open

Example of a custom view cell #33

kpmaalej opened this issue Oct 2, 2012 · 6 comments

Comments

@kpmaalej
Copy link

kpmaalej commented Oct 2, 2012

I think the example lacks the use of a PrettyCustomViewTableViewCell.

Specifically, I have a project where I use this class, and I haven't quite understood how to use it correctly. My cells contents aren't properly masked (the view goes out of the boundaries when there are rounded corners) and I haven't found a public property to set the view.

Could you enlighten me?

@vicpenap
Copy link
Owner

vicpenap commented Oct 2, 2012

Sure. Create a UIView with your custom content, and then set the customView property of the PrettyCustomViewTableViewCell to your view. That should be enough.

In fact, PrettyGridTableViewCell is a subclass of PrettyCustomViewTableViewCell, so you may take a look there to better understand how it works.

Anyway, I've found its performance is not very good, so don't rely too much on it :)

@kpmaalej
Copy link
Author

kpmaalej commented Oct 2, 2012

Hmm, I design my custom cells in Interface Builder, not in code, so... how does adding a IBOutlet to the customView property sounds?

@vicpenap
Copy link
Owner

vicpenap commented Oct 2, 2012

I can't tell. I've never done that before :|

@kpmaalej
Copy link
Author

kpmaalej commented Oct 2, 2012

There's probably a misunderstanding, otherwise your reply doesn't really make sense :)

I was proposing to change line 44 of PrettyCustomViewTableViewCell.h from

@property (nonatomic, strong) UIView *customView; 

to

@property (nonatomic, strong) IBOutlet UIView *customView; 

and pushing this change in a pull request (new or by adding it to the other if you don't mind).

@vicpenap
Copy link
Owner

vicpenap commented Oct 2, 2012

Oh sorry :)

I will probably take a look at it tomorrow then.

@kpmaalej
Copy link
Author

kpmaalej commented Oct 2, 2012

FYI, I just changed it on my local repo and it fixes my problem. I then just have to connect the view to the customView outlet in IB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants