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

Set any instance of UIView for both titleView and subtitleView properties #1

Closed
exalted opened this issue Aug 23, 2012 · 6 comments
Closed

Comments

@exalted
Copy link

exalted commented Aug 23, 2012

This should be similar how UINavigationItem's title and titleView properties work; then SMCalloutView's interface would be similar to:

@interface SMCalloutView : UIView

// ...

@property (nonatomic, copy) NSString *title, subtitle;
@property (nonatomic, retain) UIView *titleView, *subtitleView;

// ...

@end
@nfarina
Copy link
Owner

nfarina commented Aug 23, 2012

Yes I think you're right about this. I had originally patterned the title/subtitle after UITableViewCell but I think UINavigationBars model is more flexible and we could definitely support that.

@exalted
Copy link
Author

exalted commented Aug 24, 2012

Definitely, that should be enough for, e.g. five stars, etc. or whatever else people might want to put in there...

@nfarina
Copy link
Owner

nfarina commented Aug 24, 2012

Let me know if this behaves as expected!

@exalted
Copy link
Author

exalted commented Aug 24, 2012

Not so sure, if I'm not mistaken custom UIView's height must not outmatch TITLE_HEIGHT and SUBTITLE_HEIGHT respectively, otherwise things could go kinky?

@nfarina
Copy link
Owner

nfarina commented Aug 24, 2012

The title can grow vertically to cover the subtitle if you wish, but it's not possible for the callout to have any different height besides the standard.

On Aug 24, 2012, at 8:59 AM, Ali Servet Donmez notifications@github.com wrote:

Not so sure, if I'm not mistaken custom UIView's height must not outmatch TITLE_HEIGHT and SUBTITLE_HEIGHT respectively, otherwise things could go kinky?


Reply to this email directly or view it on GitHub.

@exalted
Copy link
Author

exalted commented Aug 24, 2012

Yea, I was kinda aware of that and I guess that's fine as long as it's somehow documented or warned without necessarly knowing calloutview internals...

Great great component!

Cheers,

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

2 participants