Skip to content
zhenglibao edited this page Dec 25, 2017 · 22 revisions

Cmd+R or Cmd+D not work

Please check your simulator setting: goto "Hardware -> Keyboard", checked "Use the Same Keyboard as macOS" and "Connect Hardware keyboard" If still not work, please restart your simulator and Xcode.

Cmd+R shortcut works, but ui not refresh

Please check your simulator network, make sure your mac http server is accessible on safari.

Possible reasons & solutions:

  • proxy or vpn has been set, you need to close it.
  • In iOS system settings -> Developer -> Allow HTTP Services
  • App http access was not allowed by default. You must turn on it.
  • Maybe iOS simulator need restart.
  • Turn off wifi, then turn on it.

How to localize layout file

In layout file, only view attribute support multi-language. For the attribute value, you can use @ to reference the string in Localizable.strings. Like

    <UILabel attr="text:@title"/>

Notice: if the first character is @, you should use @@ instead of @. Like

    <UILabel attr="text:@@title"/>

The label text will be @title, not the string in Localizable.strings.

By default, the framework will fetch the localizable string from mainBundle. You can implement bundleForStrings in owner to change it.

Clone this wiki locally