Programming Development

In NSView 10.12 Detailed problem does not show shadow

On iOS,If we want to display a shadow View,So basically do:

but,To the macOS,This would not work - no effect。

The answer lies in the macOS a View If you want to use [crayon-676addd[……]

Click link to continue reading...

macOS keyboard event intercepted three ways

Under normal circumstances,You do not need to know the contents。

In rare cases,Your app might need to get the user presses the button information,such asThe ones released Develop a Input Method。Only then can you provide candidates to the user。

How to create an input method under macOS,I'm hereSwift uses InputMethodKit to write an input methodThis article has detailed instructions,Here skip[……]

Click link to continue reading...

winform using video as a window background

A recent project on Windows,Customer requirements to do the "flip" a little,所以,Dynamic window background is always essential content (such as mobile phones qq login screen, right?

I thought this is a very easy to implement functionality so keen on the idea down ...... yes,In winform in,Not so easy to achieve the effect you want the。

Of course,We think that if you want to play video[……]

Click link to continue reading...

Development plate reader serial Android Andrews

Recently received a project,Demand is to do a special project Andrews board serial read and write in order to achieve some specific external devices to interact with - yes you read right,Andrews is also a board can have serial port!

Many friends do mobile development may not come into contact with - in fact, before I did not come into contact with。He stepped on seven or eight hours a pit,Finally climb out,Here to do a summary,Each board may project different circumstances,We must improvise。[……]

Click link to continue reading...

Analyzing a multi-monitor window position macOS

When developing pocketed input method,I met such a thing,That is, as a candidate bar window will go beyond the screen when the edge of the screen! and so,In the display window when I do extra check the coordinates:

In short,That is, if you count the coordinates of their width exceeds the width of the screen,Norway put it back。

but,Such[……]

Click link to continue reading...

How to make NSWindow displayed in a different Space or the Screen

Among write off the grid input method the Mac version of the process,I encountered such a problem,Article candidate system API disrepair,Many API functions exists but is essentially useless,such as:

This method is used to set the style of a candidate bar,In addition to the default inside[crayon-676addd2204ab0648[……]

Click link to continue reading...

URL encounter Chinese characters could not be initialized

In the Swift,We often used to initialize a URL path,For example, links to web pages。For example, this:

When the user clicks the button (for example, the Help button),Then all of a sudden will help the user to open the default browser,And opens the specified page (here's a forum)。

Then,If this is your link[……]

Click link to continue reading...