KeyHolder icon indicating copy to clipboard operation
KeyHolder copied to clipboard

Failed to render instance of RecordView

Open benpixel opened this issue 7 years ago • 4 comments

Hi guys!

I have installed KeyHolder via CocoaPods:

...
pod 'Magnet'
pod 'KeyHolder'

But there are some weird errors in Xcode: screen shot 2017-05-19 at 13 02 27 screen shot 2017-05-19 at 13 02 18 screen shot 2017-05-19 at 13 01 53

What's especially confusing is this line: screen shot 2017-05-19 at 13 04 34

What have I done wrong? :)

ps. is there an easy way to change components font size?

benpixel avatar May 19 '17 11:05 benpixel

@benjam1n I could reproduce the problem that IBDesignable error. I will fix it. However, this error does not cause the application to crash.

Specifying com.clipy-app.KeyHolder is Carthage or special correspondence when manual installation.

Since the font size of the component depends on the height of the RecordView, it is not possible to change the font size. Do you want to change the font size directly?

Econa77 avatar May 23 '17 05:05 Econa77

@Econa77 Yes, indeed it does not crash but it's still weird since in interface builder it shows for like 1s (as green button) and then disappears. So if you can fix it, it would be awesome. I mean this + magnet is like the best shortcut component for macOS. You guys already saved me a couple days of work. :)

About the font size, yeah I was thinking about how could I subclass it or something to make font size fixed and change the text, let's say when its focused and recording I want to just have "Recording..." and so on. Could you point me in some direction?

Thanks a lot!

benpixel avatar May 23 '17 10:05 benpixel

@benjam1n Thanks :) I checked the error of IBDesignable and found out that it is a link error of the framework using CocoaPods. ( ref: https://github.com/CocoaPods/CocoaPods/issues/5334 )

The workaround is as follows, but the fundamental modification has to wait for modification of CocoaPods or Xcode. https://github.com/CocoaPods/CocoaPods/issues/5334#issuecomment-279994132

In the current layout there is an arrangement of modifier keys, so changing the font size may be tough. However, I think that the display in the 「Recording...」 text is a good idea, so I will implement it. In addition, I am trying to create a small view component (KeyHolder-mini) like ShortcutRecorder, so please wait implementation.

Econa77 avatar May 25 '17 08:05 Econa77

I also saw this error, the only reasonable workaround I can think of is to install KeyHolder as a git submodule until CocoaPods/CocoaPods#5334 (comment) is resolved

(FYI, I'm doing this and it works fine, just need to do a recursive submodule update to get the carthage checkout of Magnet.)

jasonm23 avatar Apr 02 '18 05:04 jasonm23