Skip to main content

What is WinObjC ?

Windows Bridge for iOS (also referred to as WinObjC) is a Microsoft open source project that provides an Objective-C development environment for Visual Studio/Windows. In addition, WinObjC provides support for iOS API compatibility.

Modify an iOS app for Windows

While the Windows Bridge for iOS provides support for Objective-C within a UWP app, there are some differences between the iOS and Windows platform that might necessitate code modifications or additions. Windows supports a wide variety of form factors and screen sizes. For a good user experience, your app should be aware of and respond to the configuration on which it’s run. That means, at startup your app needs to specify:

  • How large (width/height) it should be
  • What magnification it should render at
  • How window resize should be handled
  • To specify these behaviors, simply create a Category for your UIApplication in your AppDelegate called UIApplicationInitialStartupMode

ProjectProperties

If you’d like to instead manually configure properties of the WOCDisplayMode object, the following are available.

autoMagnification : This property can be used, along with a fixedWidth and fixedHeight, to handle window size changes by simply « zooming » in/out. The pixel width/height of your app will remain constant (as specified below) but the magnification will change with window size.

sizeUIWindowToFit : This property resizes the application windows along with the containing window. If this is set to FALSE then the application will remain at the specified (original) size irrespective of its containing window.

fixedWidth : This property specifies the width, in pixels, of the application. If set to « 0 » then the width of the application will follow the width of the containing window.

fixedHeight : This property specifies the height, in pixels, of the application. If set to « 0 » then the height of the application will follow the height of the containing window.

fixedAspectRatio : If this property is set to 0 then the app has no fixed aspect ratio. However, if it has a non-zero value, then the provided aspect ratio will be maintained throughout any resizing operations.

magnification : If this property is set to 0 then the application may zoom in/out as the window is resized. However, if set to a non-zero value then the magnification is fixed and this may be used to increase app size on high resolution displays.

href="https://github.com/Microsoft/WinObjC/" data-color-override="false" data-hover-color-override="false" data-hover-text-color-override="#fff">Button Text href="https://github.com/Microsoft/WinObjC/wiki" data-color-override="false" data-hover-color-override="false" data-hover-text-color-override="#fff">Button Text href="https://dev.windows.com/fr-fr/downloads" data-color-override="false" data-hover-color-override="false" data-hover-text-color-override="#fff">Button Text
Valéry Girou

D.A. / DIGITAL / WEB / PRINT / Co-fondateur du site ELECTRICNEWS.fr / Consultant & Formateur Digital / Web / Print

Pin It on Pinterest