Python – Draw “complex” shapes in Photoshop

Today a funny trick using Python that allow you to control the mouse movements (move, click, drag, recognize RGB and much more…).

Configure the environment

Read More

Swift – Push UIView animation

Simple code snippet today that show how to push a UIView and obtain the same effect of a UINavigationController as push action, choosing also the side (.fromLeft / .fromRight).

We can do this using the CATransitionanimations. Very simple:

func push( view: UIView, side: CATransitionSubtype = .fromRight ) {
    let transition = CATransition()
    transition.type = CATransitionType.push
    transition.subtype = side

    self.layer.add(transition, forKey: nil)

Enjoy pushing!


Swift – Get app keyWindow

Quick memo to get the keyWindow for all iOS versions until now.

KeyWindow is the “key” window of your entire application. The key window receives keyboard and other non-touch related events. Only one window at a time may be the key window.

Use the #available(iOS 13.0, *) keyword to bypass system check:

Read More

Swift – FlatUI color palette cocoapod library

As personal utility I’ve created a new FlatUIColor Cocoapod framework.

Consist of a simple UIColor extension with a customized set of my favorite flat colors that I use very often.

To integrate in your project, simply add this line in your Podfile:

pod 'FlatUIColors', :git => ''

Install pods from terminal: $ pod install and open your project $ xed .

Read More

Remove alpha channel from png images

Every time you upload a screenshot on the App Store for a new app submission, you receive from Apple this error message:

“Images can’t contain alpha channels or transparencies.”

Read More

Send data between Apple devices (iPhone/iPad/macOS) using Multipeer Connectivity

Today I want to introduce an Apple framework, called Multipeer Connectivity.

“The Multipeer Connectivity framework supports the discovery of services provided by nearby devices and supports communicating with those services through message-based data, streaming data, and resources (such as files). In iOS, the framework uses infrastructure Wi-Fi networks, peer-to-peer Wi-Fi, and Bluetooth personal area networks for the underlying transport. In macOS and tvOS, it uses infrastructure Wi-Fi, peer-to-peer Wi-Fi, and Ethernet.”

Reference here:

Read More

Swift – Useful NotificationName extension

Very often you should use a notification name in your code and every time you miss something, you write the wrong name and so on…

I want to simplify the coding like, so I use this solution. Easy and simple for me and I want to share:

Read More

macOS – App Icon Maker free utility

I want to introduce you to the new “App Icon Maker“, a simple and free utility for macOS that helps you to convert the images in the 3 Apple formats, @1x, @2x, and @3x.

Read More

Swift / C – Lock macOS programmatically

PrivateFrameworks are always a joy.

Today, for a personal project I discovered how to use private Login.framework to lock programmatically via code (Swift or C) the screen of my mac book.

Read More

Swift – Identify misspelled words and errors in phrases

A simple tutorial for find and identify the wrong typed words of the user in your application using the UITextChecker framework and the NatualLanguage framework.

Final result:

Read More