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

How to overlay components on top of other components? #80

Closed
aaronschubert0 opened this issue Apr 8, 2015 · 4 comments
Closed

How to overlay components on top of other components? #80

aaronschubert0 opened this issue Apr 8, 2015 · 4 comments
Labels

Comments

@aaronschubert0
Copy link
Contributor

Hi I'm trying to create a interface where a UIImage is partly on top of a UIView and then another UIView is on top of it. How would I accomplish this?

What I want to implement:
screen shot 2015-04-08 at 15 32 43

What I have:
ios simulator screen shot 8 apr 2015 15 34 57

Never mind the font differences

@benlodotcom
Copy link
Contributor

Did you check out CKOverlayLayoutComponent ?

@aaronschubert0
Copy link
Contributor Author

@benlodotcom Yeah I did, the problem is that it stretches the component out in top of it, unless I could specify 'blank space'?

Is CKOverlayLayoutComponent supposed to support this type of interface?

@adamjernst
Copy link
Contributor

Use CKInsetComponent with an infinite left/top inset to remove the stretching:

[CKOverlayLayoutComponent
 newWithComponent:component
 overlay:
 [CKInsetComponent
  newWithInsets:{.left = INFINITY, .top = INFINITY}
  component:overlayComponent]]

@aaronschubert0
Copy link
Contributor Author

@adamjernst thanks, I'll give that a chance and report back.

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

No branches or pull requests

4 participants