Skip to main content

Posts

Showing posts from October, 2020

Custom Loader (Activity Indicator) in Swift

Creating a custom activity indicator in Swift allows you to tailor the appearance and behavior of your loading spinner to fit the style of your app. Here's a step-by-step guide to creating a simple custom activity indicator using UIView Step 1: Create a New Swift File for the Custom Activity Indicator Create a new Swift file and name it  RotatingCirclesView.swift . Add the following code to define a custom UIView subclass for your activity indicator: // //   RotatingCirclesView.swift //   Welcome In // //   Created by Praveen Kumar on 05/09/24. // import UIKit class RotatingCirclesView : UIView {          let circle1 = UIView ( frame : CGRect ( x : 20 , y : 20 , width : 60 , height : 60 ))     let circle2 = UIView ( frame : CGRect ( x : 120 , y : 20 , width : 60 , height : 60 ))          let position : [ CGRect ] = [ CGRect ( x : 30 , y : 20 , width : 60 , height : 60 ), CGRect ( x : 60 , y : 15 ,...

Add a Scene Delegate to your existing project with Storyboard in Swift

To add a scene delegate, first, create a new Swift file that you’ll call "SceneDelegate" containing a subclass of UIResponder, just like the AppDelegate, and that conforms to UIWindowSceneDelegate.  As your app might supports other versions than iOS 13, make this class only available for iOS 13. This is what you should have : If you are working a project that is storyboard based, please set storyboard  initial view controller SceneDelegate.swift import UIKit @available ( iOS 13.0 , *) class SceneDelegate : UIResponder , UIWindowSceneDelegate {     var window : UIWindow ?     func scene ( _ scene: UIScene , willConnectTo session: UISceneSession , options connectionOptions: UIScene . ConnectionOptions ) {                  let storyboard = UIStoryboard (name: "Main" , bundle: nil )         let initialViewController = storyboard. instantiateViewController (withIdentifier: "ViewController"...

Deep Linking - What Allow User Deep Linking

  What is Deep Linking? (The Best Answer!) https://buildfire.com/what-is-deep-linking/  - GitHub Here’s the deal: The ability to sync your  mobile app  with relevant content and make it more user-friendly and invaluable depends to a large degree on how you use deep links. It’s no news that apps are taking over the mobile experience.  Data by Flurry  shows that over 86% of the 3 hours people spend with their mobile phones daily are spent within their mobile apps. ComScore recently published a  supporting data  on that also. It’s predicted  that by 2021, enterprise app revenue will hit $430 billion even as companies are increasing their investments on mobile apps. There are a bunch of  reasons develop a mobile app for your business  if you don’t already have, and to optimize it for best conversion. However, unlike websites where you can easily link to your products within your web page or from other websites — it wasn’t...

Create Graphs & Charts in App with Swift With Charts cocoapods

Charts 3.6.0 1. CocoaPods Install Add pod 'Charts' in your podfile pod 'Charts' Then Pod Install With Terminal. Then  1. if you want to used Bar Chart in your project then Start. import Charts import UIKit     class ViewController: UIViewController, ChartViewDelegate {          var barChart = BarChartView()          override func viewDidLoad(){     super.viewDidLoad()     barChart .delegate = self     }            override func  viewDidLayoutSubviews(){     super.viewDidLayoutSubviews()     barChart.frame = CGRect(x: 0, y: 0, width: self.view,frame.size.width , hieght: self.view,frame.size.width)     barChart.center = view.center     view.addSubview(barChart)          var entries = [BarChartDataEntry]()     for x in 0..<10{         entries.append(BarCh...