Author: Sergey Kargopolov

Software developer

Web: www.appsdeveloperblog.com

In this tutorial, you will learn how to create a very simple Spring Cloud API Gateway Global Pre-filter and Post filter classes. Global filters are executed for every route defined in the API Gateway. The main difference between pre-filter and post-filter class is that the pre-filter code is executed before Spring Cloud API Gateway routes the request…

Read More Spring Cloud API Gateway Global Filter Example

Let’s create a Dictionary with two elements first. var myDictionary = [“first_name”: “Sergey”, “last_name”: “Kargopolov”] Now we can remove all elements from a Dictionary. myDictionary.removeAll() print(myDictionary) For more Swift code examples and tutorials, please check the Swift Code Examples page on this website.

Read More Remove All Items From a Dictionary

First, let’s create a Dictionary with two elements. var myDictionary = [“first_name”: “Sergey”, “last_name”: “Kargopolov”] print(myDictionary) Now we can add a new key with a value. myDictionary[“user_id”] = “f5h7ru0tJurY8f7g5s6fd” We should now have 3 key-value pairs printed print(myDictionary) For more Swift code examples and tutorials, please check the Swift Code Examples page on this website.

Read More Add Item to a Dictionary in Swift

In this Swift code example, you will learn how to make the music playback slider smoothly move as the music continues to play so that the user is visually aware of how much of the music file has been already played and how much is left to play. Create AVPlayer and AVPlayerItem Create UIButton programmatically…

Read More AVPlayer. Add Periodic TimeObserver to Update Music Playback Slider

In this short Swift code example, you will learn how to declare a Closure with multiple arguments in Swift. Declare a Closure with two arguments Call a Closure Declare and Call a Closure Example #1 let fullName = { (firstName:String, lastName:String)->String in return firstName + ” ” + lastName } //Call Closure let myFullName =…

Read More Declare a Closure With Multiple Arguments in Swift

One of the ways to make sure that an HTTP request to a web service endpoint contains an Authorization JWT token is to configure a gateway route to require an Authorization header.  This way, if the HTTP request does not contain an Authorization header, Spring Cloud API Gateway will not even route this request to…

Read More The Header Predicate in Spring Cloud API Gateway

There are a few different ways of how to create an Array with default values in Swift. Below are a few Swift code examples of creating an Array. Each example creates an array with some initial values. Create an Array of Strings var appleProgrammingLanguages: [String] = [“Swift”, “Objective-C”] Thanks to Swift’s type inference, you don’t…

Read More Create an Array with Default Values in Swift

In this tutorial, you will learn how to configure your Spring Cloud API Gateway to automatically create routes based on services registered with Discovery clients like Eureka, Consul, or Zookeeper. For a step by step series of video lessons, please check this page: Spring Boot Microservices and Spring Cloud. Enable Discovery Locator A very quick way…

Read More Spring Cloud API Gateway Automatic Mapping of Routes

To present a ViewController in a NavigationController you can wrap ViewController into a NavigationController as it is in the example below. Then present NavigationController which contains ViewController. // Register Nib let newViewController = CustomSignupViewController(nibName: “CustomSignupViewController”, bundle: nil) let navigationController = UINavigationController(rootViewController: newViewController) // Present View “Modally” self.present(navigationController, animated: true, completion: nil)  

Read More Present ViewController in NavigationController

With this blog post, I wanted to share with you a code example as we as a few video tutorials that demonstrate how to add inline UIDatePicker or DateCell into a UITableView in Swift. Originally, the DateCell example was implemented by Apple as an Objective C project and it is available for download here: Apple DateCell.…

Read More Inline UIDatePicker or DateCell Example in Swift

In this tutorial, you will learn how to use change the background color of the top App Bar in Flutter. To change the background color of the AppBar widget in Flutter, we use its backgroundColor property. AppBar( backgroundColor: Colors.red ), // AppBar Below is a very simple Flutter app example, that uses the above code snippet…

Read More Changing AppBar Background Color in Flutter