Category: Uncategorized
-
Extract Single Image from Video
Get that favorite frame from video
-
Adjust Baseline of Text Using NSAttributedString
Fix Urdu font issues in iOS
-
URL Encode only Unicode Characters
Make your URLs readable by the Framework SDK
-
Adjust Scroll View Content Inset Based on Keyboard Frame
Reveal text fields in form when keyboard is shown/hidden
-
Get Specific URLQueryItem from URLComponents
Consider the following URL: http://www.example.com/?utm_source=adsite&utm_campaign=adcampaign&utm_term=adkeyword We are interested in the query parameter value of utm_term. We can parse the URL using the following code: And call the function using:
-
Get filename without extension
Consider the following filename: hls_a128_v4.m3u8 We are interested in getting filename only (without extension). We can do so with the help of following code:
-
UIWindow Presentation Context
Get top most presented UIViewController of UIWindow
-
Sample: Working Example of Background Audio Mode with Displaying Information in Command Center and Handling Remote Control Commands
I have previously written separate articles: Article: Configure Audio Session for background audio mode (iOS Project) Article: Display now playing information in Command Center Article: Handle Remote Control Commands Here is the sample project: MediaPlayerExample
-
Get device token for remote push notifications in Swift 3
When registering device to receive remote notifications, we can use device token to uniquely identify each device and even send the token to our server. Consider the following code Here is gist for the example Source: RayWenderlich
-
Custom Sorting an Array in Swift
Let’s assume we have following Business struct And we have following data set for business with left value being businessId and right being rating We should sort businesses in descending order of rating. For the businesses that have same rating, the original order of business should remain same. To solve this, we can have following…