-
Notifications
You must be signed in to change notification settings - Fork 74
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
iOS support for label, text input, font, more tests #55
Conversation
This is so cool! Really excited to see the iOS side coming together - hella appreciated as always. Will look at merging this soon, sat down to look at the objc2 stuff today but got pulled into other issues work-related. :( Re: the appkit/uikit breakdown, one thing I did in the Lines 67 to 69 in f84a9df
Curious for your thoughts on it - is it better/worse/irrelevant given your point regarding feature flags above? |
No pressure! I was tempted to wait on the objc2 stuff but got excited doing this.
This is actually one of the few places I noticed it and found it a little difficult. I might submit a separate PR. I doubt there's any clippy/fmt-esk tool to help with this. |
@simlay is this okay to be merged? Looking to cut a |
Yeah. I actually updated this branch out of the blue 3 weeks ago. It looks like there might be more merge conflicts. Do you wanna deal with those or shall I? |
Hmmm, I think it's actually just a formatting pass that's needed... otherwise this stuff could fit into a |
Hopefully I just fixed that. We'll see. |
Aye, looks like it's all smooth now - shall I merge? |
Merge! (pretty please) |
Merged. :) I'll likely cut a |
I was on vacation last week and did this for fun so it's a bit disorganized. I started out doing unit tests and then got off track. This PR should probably be broken up into a few things.
changes
layer
onImageView
Label
viaUILabel
TextField
andTextFieldDelegate
viaUITextField
(though, this uses itself as a delegate which seems less than ideal)Font
unit tests and what I think is an okayimpl Default
forFont
with uikit.ios-beta
has aLabel
,TextView<ConsolLogger>
and theImageView
is in the center of the 3rd view:Tests on:
Label
Font
TextView
View
.Protip:
There's not a great way to develop for mutually exclusive feature flags but what I have found is that if we structure things like:
In an editor config (I use vim with an LSP client and rust-analyzer) enable both of those feature flags you can reasonably navigate the codebase. The "jump to definition
of
register_view_classis this case would go to
appkitdefinition but to get to the
uikitdefinition, you have to jump to definition of the
mod uikitand then the
register_view_class`.Here's the
.vim/settings.json
I used in this PR (I think this is either identically or similar for most other setups):