Macaw-Examples icon indicating copy to clipboard operation
Macaw-Examples copied to clipboard

PeriodicTable issue

Open leejinseong9410 opened this issue 4 years ago • 5 comments

스크린샷 2021-08-06 오후 8 27 34 스크린샷 2021-08-06 오후 8 27 48 스크린샷 2021-08-06 오후 8 28 36

I created a mobile app that is very similar to PeriodicTable. but my app not run Which NSCoder type goes into parameters when invoking PeriodicTable? Sorry, my app doesn't use storyboard. And if you're using a storyboard, nothing will appear on the screen. Help me, please.

leejinseong9410 avatar Aug 06 '21 11:08 leejinseong9410

Hi, @leejinseong9410, you can use init(frame: CGRect), I suggest you not use init with a coder in this place.

amarunko avatar Aug 06 '21 13:08 amarunko

@leejinseong9410 님, init(frame: CGRect)를 사용하시면 됩니다. 이 곳에서는 init를 코더와 함께 사용하지 않는 것이 좋습니다.

I'm really sorry, but can I explain it in code?

leejinseong9410 avatar Aug 06 '21 13:08 leejinseong9410

@leejinseong9410 님, init(frame: CGRect)를 사용하시면 됩니다. 이 곳에서는 init를 코더와 함께 사용하지 않는 것이 좋습니다. I have a question. Is this possible on the iPhone app?

leejinseong9410 avatar Aug 06 '21 14:08 leejinseong9410

UIView (MacawView subclass of UIView for iOS apps) has different initializers, and in this situation better use not init with coder, but init with frame:

`class SomeCustomView { override init(frame: CGRect) { init actions here super.init(frame: frame) } }

let yourView = SomeCustomView(frame: CGRect.zero) `

Something like this Yes, it is possible to do this for iPhone - as any iOS device

amarunko avatar Aug 07 '21 10:08 amarunko

UIView(iOS 앱용 UIView의 MacawView 하위 클래스)에는 다른 이니셜라이저가 있으며 이 상황에서는 코더로 초기화하지 않고 프레임으로 초기화하는 것이 더 좋습니다.

`class SomeCustomView { 재정의 init(frame: CGRect) { init actions here super.init(frame: frame) } }

let yourView = SomeCustomView(프레임: CGRect.zero) `

이런 식으로 뭔가 어떤 아이폰 OS 장치로 - 예, 아이폰이 작업을 수행 할 수 있습니다 스크린샷 2021-08-07 오후 9 43 41 스크린샷 2021-08-07 오후 9 40 30 스크린샷 2021-08-07 오후 9 40 02

Hello That's my current code. I just changed the name of the variable in your code, but everything is the same. But nothing is going to work. Also, " Showing Recent Messages Undefined symbol: Macaw.MacawView.init(node: Macaw.Node, frame: __C.CGRect) -> Macaw.MacawView" error has occurred and will not run. What did I do wrong? Thank you.

leejinseong9410 avatar Aug 07 '21 12:08 leejinseong9410