<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Murali Yarramsetti on Medium]]></title>
        <description><![CDATA[Stories by Murali Yarramsetti on Medium]]></description>
        <link>https://medium.com/@muraliyarramsetti?source=rss-340cd94b2179------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pmAaPrdpD9ID122azGHCKw@2x.jpeg</url>
            <title>Stories by Murali Yarramsetti on Medium</title>
            <link>https://medium.com/@muraliyarramsetti?source=rss-340cd94b2179------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 13:21:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@muraliyarramsetti/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[✅ iOS Interview Questions & Answers (Short + Perfect for Interviews)]]></title>
            <link>https://medium.com/@muraliyarramsetti/ios-interview-questions-answers-short-perfect-for-interviews-a0b65994abe4?source=rss-340cd94b2179------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0b65994abe4</guid>
            <dc:creator><![CDATA[Murali Yarramsetti]]></dc:creator>
            <pubDate>Thu, 27 Nov 2025 10:58:56 GMT</pubDate>
            <atom:updated>2025-11-27T10:59:59.211Z</atom:updated>
            <content:encoded><![CDATA[<p>⸻</p><p>📱 Swift Basics</p><ol><li>Difference between class and struct?</li><li>•	Struct → Value type, stored in stack, copied on assignment, faster, no inheritance.</li><li>•	Class → Reference type, stored in heap, shared references, supports inheritance &amp; deinit.</li></ol><p>⸻</p><p>2. What is ARC?</p><p>ARC (Automatic Reference Counting) tracks number of strong references to an object.</p><p>When count → 0, memory is freed automatically.</p><p>⸻</p><p>3. strong vs weak vs unowned</p><p>•	strong → increases retain count, keeps object alive.</p><p>•	weak → does NOT increase retain count, becomes nil automatically.</p><p>•	unowned → does NOT increase retain count, never becomes nil, crashes if accessed after death.</p><p>⸻</p><p>4. What are optionals?</p><p>A type that may or may not contain a value.</p><p>Swift uses them for safety to avoid null pointer crashes.</p><p>⸻</p><p>5. let vs var</p><p>•	let → constant (immutable)</p><p>•	var → variable (mutable)</p><p>⸻</p><p>6. What is a closure?</p><p>A self-contained block of code that can capture values from its surrounding context.</p><p>It’s similar to lambdas in other languages.</p><p>⸻</p><p>7. What are property observers?</p><p>willSet and didSet run before and after property changes.</p><p>Used for validation or updating UI.</p><p>⸻</p><p>8. Value type vs Reference type</p><p>•	Value type → copied (struct, enum, tuple)</p><p>•	Reference type → shared reference (class)</p><p>⸻</p><p>🔄 Concurrency</p><p>9. GCD vs OperationQueue</p><p>•	GCD → lightweight, low-level, very fast, block-based.</p><p>•	OperationQueue → higher-level, supports dependencies, cancel, priority.</p><p>⸻</p><p>10. What is async/await?</p><p>A modern concurrency model that makes async code look like synchronous code.</p><p>Avoids callback hell and makes code cleaner.</p><p>⸻</p><p>11. Normal call vs async call</p><p>•	Normal function → runs immediately on the same thread.</p><p>•	Async function → suspends the function, yields control, resumes after task completion.</p><p>⸻</p><p>12. What is the main thread rule?</p><p>All UI updates must happen on the main thread.</p><p>Background thread must NOT modify UI.</p><p>⸻</p><p>13. What is a race condition?</p><p>When multiple threads modify shared data at the same time → inconsistent results.</p><p>Avoid with:</p><p>•	serial queues</p><p>•	locks</p><p>•	actors (Swift concurrency)</p><p>15. What is deadlock?</p><p>Two threads waiting for each other forever.</p><p>Example: calling sync on the same queue you’re currently executing on.</p><p>⸻</p><p>🧱 Architecture / Patterns</p><p>16. MVC vs MVVM vs VIPER</p><p>•	MVC → Controller becomes massive.</p><p>•	MVVM → ViewModel reduces controller size, better testability.</p><p>•	VIPER → Very modular, complex apps, 5 layers.</p><p>⸻</p><p>17. What is Delegate pattern?</p><p>A one-to-one communication pattern.</p><p>Object A informs Object B about events.</p><p>⸻</p><p>18. NotificationCenter</p><p>Broadcast message to multiple receivers (one-to-many).</p><p>No tight coupling.</p><p>⸻</p><p>19. What is dependency injection?</p><p>Passing dependencies from outside rather than creating inside.</p><p>Improves testability &amp; flexibility.</p><p>⸻</p><p>20. Singleton</p><p>A class with only one shared instance.</p><p>Pros: convenience</p><p>Cons: hard to test, global state risk.</p><p>⸻</p><p>21. Combine / Swift Concurrency vs RxSwift</p><p>•	Swift Concurrency is native, lightweight, compiler-checked.</p><p>•	Replace most use cases of RxSwift for modern apps.</p><p>⸻</p><p>22. Protocol-Oriented Programming</p><p>Swift encourages using protocols instead of inheritance.</p><p>Provides default implementations using protocol extensions.</p><p>⸻</p><p>🌐 Networking</p><p>23. How URLSession works?</p><p>A high-level API to make HTTP/HTTPS calls using tasks:</p><p>•	dataTask</p><p>•	uploadTask</p><p>•	downloadTask</p><p>⸻</p><p>24. HTTP Methods</p><p>•	GET → fetch data</p><p>•	POST → create</p><p>•	PUT → update</p><p>•	DELETE → delete</p><p>⸻</p><p>25. What is Codable?</p><p>A protocol that enables easy JSON encoding/decoding using the compiler.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0b65994abe4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SwiftUI Interview Questions and Answers]]></title>
            <link>https://medium.com/@muraliyarramsetti/swiftui-interview-questions-and-answers-72a81adb45b1?source=rss-340cd94b2179------2</link>
            <guid isPermaLink="false">https://medium.com/p/72a81adb45b1</guid>
            <dc:creator><![CDATA[Murali Yarramsetti]]></dc:creator>
            <pubDate>Wed, 09 Jul 2025 10:27:43 GMT</pubDate>
            <atom:updated>2025-07-09T10:28:28.653Z</atom:updated>
            <content:encoded><![CDATA[<p>Q: What is SwiftUI?</p><p>A: SwiftUI is Apple’s declarative UI framework introduced in 2019. It allows developers to build user interfaces for all</p><p>Apple platforms using Swift code with less boilerplate and more real-time feedback via Xcode previews.</p><p>Q: How is SwiftUI different from UIKit?</p><p>A: SwiftUI is declarative and reactive, requiring less code and enabling live previews. UIKit is imperative, requires more</p><p>boilerplate, and manual UI updates.</p><p>Q: What is @State in SwiftUI?</p><p>A: @State is a property wrapper used for local state within a View. When its value changes, the View automatically re-renders.</p><p>Q: What is a @Binding in SwiftUI?</p><p>A: @Binding allows a child view to read and write to a state owned by a parent view.</p><p>Q: What is the purpose of @ObservedObject and @Published?</p><p>A: @ObservedObject is used in a view to subscribe to an external data model. @Published marks properties that will</p><p>trigger view updates.</p><p>Q: Difference between @StateObject, @ObservedObject, @EnvironmentObject?</p><p>A: @StateObject creates and owns state. @ObservedObject observes passed-in state. @EnvironmentObject observes</p><p>globally shared state.</p><p>Q: How do you handle navigation in SwiftUI?</p><p>A: Use NavigationView and NavigationLink for basic navigation patterns.</p><p>Q: How does data flow work in SwiftUI?</p><p>A: Data flows via property wrappers like @State, @Binding, @StateObject, @ObservedObject, and</p><p>@EnvironmentObject.</p><p>SwiftUI Interview Questions and Answers</p><p>Q: What is a ViewBuilder?</p><p>A: A ViewBuilder is a special result builder allowing multiple views in closures without explicit return.</p><p>Q: What is the use of some View?</p><p>A: some View is used for opaque return types, allowing the compiler to infer the specific view type.</p><p>Q: How would you share state between views?</p><p>A: Use EnvironmentObject or pass ObservableObject instances to child views.</p><p>Q: How do you test a SwiftUI view?</p><p>A: Use XCTest for ViewModels and XCUITest for UI tests. Previews help visually.</p><p>Q: How does SwiftUI handle view lifecycle?</p><p>A: SwiftUI uses value types. Use .onAppear, .onDisappear or task {} instead of viewDidLoad etc.</p><p>Q: Can SwiftUI and UIKit work together?</p><p>A: Yes, use UIHostingController to embed SwiftUI in UIKit, and UIViewControllerRepresentable to embed UIKit in</p><p>SwiftUI.</p><p>Q: How does SwiftUI achieve animations?</p><p>A: Use .animation modifiers or withAnimation blocks to animate view changes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72a81adb45b1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Clearly understand and use async/await in iOS (Swift),]]></title>
            <link>https://medium.com/@muraliyarramsetti/clearly-understand-and-use-async-await-in-ios-swift-db72ba178086?source=rss-340cd94b2179------2</link>
            <guid isPermaLink="false">https://medium.com/p/db72ba178086</guid>
            <dc:creator><![CDATA[Murali Yarramsetti]]></dc:creator>
            <pubDate>Sat, 19 Apr 2025 02:54:18 GMT</pubDate>
            <atom:updated>2025-04-19T02:54:18.103Z</atom:updated>
            <content:encoded><![CDATA[<p>Introduced in Swift 5.5 (iOS 13+), async/await makes asynchronous code more readable and easier to manage than traditional completion handlers.</p><pre>func fetchData() async throws -&gt; String {<br>    // Simulate network delay<br>    try await Task.sleep(nanoseconds: 1_000_000_000)<br>    return &quot;Data from server&quot;<br>}<br><br>func loadData() {<br>    Task {<br>        do {<br>            let data = try await fetchData()<br>            print(&quot;Received: \(data)&quot;)<br>        } catch {<br>            print(&quot;Error: \(error)&quot;)<br>        }<br>    }<br>}</pre><p>Key Concepts</p><p>•	async – Marks a function that can pause and resume.</p><p>•	await – Pauses execution until the async function returns.</p><p>•	Task – Used to call async code from non-async contexts (like UIViewController lifecycle methods).</p><p>•	try – Used because many async functions can throw errors.</p><p><strong>Common Usage in iOS</strong></p><ol><li><strong>Network Calls</strong></li></ol><pre>func fetchUser() async throws -&gt; User {<br>    let url = URL(string: &quot;https://example.com/user&quot;)!<br>    let (data, _) = try await URLSession.shared.data(from: url)<br>    return try JSONDecoder().decode(User.self, from: data)<br>}</pre><p><strong>2. Updating UI</strong></p><p>Always switch to main thread when updating UI:</p><pre>let user = try await fetchUser()<br>DispatchQueue.main.async {<br>    self.label.text = user.name<br>}</pre><p>Or with MainActor</p><pre>@MainActor<br>func updateUI(user: User) {<br>    self.label.text = user.name<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db72ba178086" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[View Controller Lifecycle]]></title>
            <link>https://medium.com/@muraliyarramsetti/view-controller-lifecycle-79fc7058f92f?source=rss-340cd94b2179------2</link>
            <guid isPermaLink="false">https://medium.com/p/79fc7058f92f</guid>
            <dc:creator><![CDATA[Murali Yarramsetti]]></dc:creator>
            <pubDate>Wed, 26 Apr 2023 12:38:50 GMT</pubDate>
            <atom:updated>2023-04-26T12:38:50.642Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*WPSpuW-jrF_tdUwoWz6Wwg.png" /></figure><p>- loadView</p><p>Creates the view that the controller manages. It’s only called when the view controller is created and only when done programatically.</p><p>- viewDidLoad</p><p>Called after the controller’s view is loaded into memory. It’s only called when the view is created.</p><p>- viewWillAppear</p><p>It’s called whenever the view is presented on the screen. In this step the view has bounds defined but the orientation is not applied.</p><p>- viewWillLayoutSubviews</p><p>Called to notify the view controller that its view is about to layout its subviews. This method is called every time the frame changes</p><p>- viewDidLayoutSubviews</p><p>Called to notify the view controller that its view has just laid out its subviews. Make additional changes here after the view lays out its subviews.</p><p>- viewDidAppear</p><p>Notifies the view controller that its view was added to a view hierarchy.</p><p>- viewWillDisappear</p><p>Before the transition to the next view controller happens and the origin view controller gets removed from screen, this method gets called.</p><p>- viewDidDisappear</p><p>After a view controller gets removed from the screen, this method gets called. You usually override this method to stop tasks that are should not run while a view controller is not on screen.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79fc7058f92f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MVVM — iOS]]></title>
            <link>https://medium.com/@muraliyarramsetti/mvvm-ios-c993dbc1f6bd?source=rss-340cd94b2179------2</link>
            <guid isPermaLink="false">https://medium.com/p/c993dbc1f6bd</guid>
            <dc:creator><![CDATA[Murali Yarramsetti]]></dc:creator>
            <pubDate>Tue, 18 Apr 2023 04:30:58 GMT</pubDate>
            <atom:updated>2023-04-18T04:30:58.890Z</atom:updated>
            <content:encoded><![CDATA[<h3>MVVM — iOS</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*Qg6s6pWKtxtO4ELxh0oUKg.jpeg" /></figure><p>MVVM — Model ViewController ViewModel</p><ul><li><strong>View Controlle</strong>r: It only performs things related to UI — Show/get information. Part of the view layer</li><li><strong>View Model</strong>: It receives information from VC, handles all this information, and sends it back to VC.</li><li><strong>Model</strong>: This is only your model, nothing much here. It’s the same model as in MVC. It is used by VM and updates whenever VM sends new updates</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oh3NyQD1iyxWJmoJOmhiuA.png" /></figure><p><strong>ViewController</strong></p><pre>class ViewController: UIViewController {<br>    <br>    @IBOutlet weak var tableView: UITableView!<br>    @IBOutlet weak var activityIndicator: UIActivityIndicatorView!<br><br>    var dataViewModel = DataViewModel()<br>    override func viewDidLoad() {<br>        super.viewDidLoad()<br>        initViewModel()<br>    }<br>    func initViewModel(){<br>        dataViewModel.reloadTableView = {<br>            DispatchQueue.main.async { self.tableView.reloadData() }<br>        }<br>        dataViewModel.showError = {<br>            DispatchQueue.main.async { self.showAlert(&quot;Ups, something went wrong.&quot;) }<br>        }<br>        dataViewModel.showLoading = {<br>            DispatchQueue.main.async { self.activityIndicator.startAnimating() }<br>        }<br>        dataViewModel.hideLoading = {<br>            DispatchQueue.main.async { self.activityIndicator.stopAnimating() }<br>        }<br>        dataViewModel.getData()<br>    }<br>}<br><br>extension ViewController: UITableViewDataSource {<br>    <br>    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {<br>        return dataViewModel.numberOfCells<br>    }<br>    <br>    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {<br>        guard let cell = tableView.dequeueReusableCell(withIdentifier: &quot;customTableViewCell&quot;, for: indexPath) as? CustomTableViewCell else {<br>            fatalError(&quot;Cell not exists in storyboard&quot;)<br>        }<br>        let cellVM = dataViewModel.getCellViewModel( at: indexPath )<br>        cell.lblTitle.text = cellVM.titleText<br>        cell.lblSubTitle.text = cellVM.subTitleText<br>        return cell<br>    }<br>}<br><br>import UIKit<br><br>class CustomTableViewCell: UITableViewCell {<br><br>    @IBOutlet weak var lblTitle: UILabel!<br>    @IBOutlet weak var lblSubTitle: UILabel!<br>    <br>}</pre><p><strong>ViewModel</strong></p><pre>import UIKit<br><br>class DataViewModel {<br>    <br>    var datas: [Data] = [Data]()<br>    var reloadTableView: (()-&gt;())?<br>    var showError: (()-&gt;())?<br>    var showLoading: (()-&gt;())?<br>    var hideLoading: (()-&gt;())?<br>    <br>    private var cellViewModels: [DataListCellViewModel] = [DataListCellViewModel]() {<br>        didSet {<br>            self.reloadTableView?()<br>        }<br>    }<br>    <br>    func getData(){<br>        showLoading?()<br>        ApiClient.getDataFromServer { (success, data) in<br>            self.hideLoading?()<br>            if success {<br>                self.createCell(datas: data!)<br>                self.reloadTableView?()<br>            } else {<br>                self.showError?()<br>            }<br>        }<br>    }<br>    <br>    var numberOfCells: Int {<br>        return cellViewModels.count<br>    }<br>    <br>    func getCellViewModel( at indexPath: IndexPath ) -&gt; DataListCellViewModel {<br>        return cellViewModels[indexPath.row]<br>    }<br>    <br>    func createCell(datas: [Data]){<br>        self.datas = datas<br>        var vms = [DataListCellViewModel]()<br>        for data in datas {<br>            vms.append(DataListCellViewModel(titleText: data.title, subTitleText: data.subTitle))<br>        }<br>        cellViewModels = vms<br>    }<br>}<br><br>struct DataListCellViewModel {<br>    let titleText: String<br>    let subTitleText: String<br>}</pre><p><strong>Model</strong></p><pre><br>import Foundation<br><br>class Data {<br>    var title: String<br>    var subTitle: String<br>    <br>    init(title: String, subTitle: String) {<br>        self.title = title<br>        self.subTitle = subTitle<br>    }<br>}</pre><p><strong>Network</strong></p><pre>public struct ApiClient {<br>    <br>    static func getDataFromServer( complete: @escaping (_ success: Bool, _ data: [Data]? )-&gt;() ){<br>        DispatchQueue.global().async {<br>            sleep(2)<br>            var dummyData: [Data] = [Data]()<br>            for i in 0...100{<br>                dummyData.append(Data(title: &quot;This is a title \(i)&quot;, subTitle: &quot;This is a subtitle&quot;))<br>            }<br>            complete(true, dummyData)<br>            // If server gives an error, use &quot;complete(false, nil)&quot;<br>        }<br>    }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*He7p8H05MlR-T5Pm8F11ug.png" /></figure><h3>Maintainability</h3><ul><li>A clean separation of different kinds of code should make it easier to go into one or several of those more granular and focused parts and make changes without worrying.</li><li>That means you can remain agile and keep moving out to new releases quickly.</li></ul><h3>Testability</h3><ul><li>With MVVM each piece of code is more granular and if it is implemented right your external and internal dependences are in separate pieces of code from the parts with the core logic that you would like to test.</li><li>That makes it a lot easier to write unit tests against a core logic.</li><li>Make sure it works right when written and keeps working even when things change in maintenance.</li></ul><h3>Extensibility</h3><ul><li>It sometimes overlaps with maintainability, because of the clean separation boundaries and more granular pieces of code.</li><li>You have a better chance of making any of those parts more reusable.</li><li>It has also the ability to replace or add new pieces of code that do similar things into the right places in the architecture.</li></ul><p>The obvious purpose of MVVM pattern is abstraction of the View which reduces the amount of business logic in code-behind. However, following are some other solid advantages −</p><ul><li>The ViewModel is easier to unit test than code-behind or event-driven code.</li><li>You can test it without awkward UI automation and interaction.</li><li>The presentation layer and the logic is loosely coupled.</li></ul><h3>Disadvantages</h3><ul><li>Some people think that for simple UIs, MVVM can be overkill.</li><li>Similarly in bigger cases, it can be hard to design the ViewModel.</li><li>Debugging would be bit difficult when we have complex data bindings.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c993dbc1f6bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Closures — Swift]]></title>
            <link>https://medium.com/@muraliyarramsetti/closures-swift-f376b37bf54e?source=rss-340cd94b2179------2</link>
            <guid isPermaLink="false">https://medium.com/p/f376b37bf54e</guid>
            <dc:creator><![CDATA[Murali Yarramsetti]]></dc:creator>
            <pubDate>Tue, 18 Apr 2023 03:36:55 GMT</pubDate>
            <atom:updated>2023-04-19T07:32:43.182Z</atom:updated>
            <content:encoded><![CDATA[<h3>Closures — Swift</h3><p>Closures can capture and stores references to any constant or variable.</p><p>Closure is a block of statements which can be passed as arguments to a method.</p><pre>//Simple Closure<br>var simplecloser = {<br>    print(&quot;simple&quot;)<br>}<br><br>//Addition Closures<br>var sum:(Int, Int)-&gt; Int = { (num1, num2) in<br>    return num1 + num2<br>    <br>}<br>var sum: (Int, Int)-&gt; Int = {<br>    return $0 + $1<br>}<br><br>var sum: (Int,Int)-&gt; Int = {$0 + $1}<br><br>let sumRes = sum(10,20) // 30<br>print(sumRes)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f376b37bf54e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to trigger Sound every time a breakpoint?]]></title>
            <link>https://medium.com/@muraliyarramsetti/how-to-trigger-sound-every-time-a-breakpoint-8bfde320cc83?source=rss-340cd94b2179------2</link>
            <guid isPermaLink="false">https://medium.com/p/8bfde320cc83</guid>
            <dc:creator><![CDATA[Murali Yarramsetti]]></dc:creator>
            <pubDate>Wed, 12 Apr 2023 04:16:37 GMT</pubDate>
            <atom:updated>2023-04-12T04:16:37.224Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*gz8X99mzGe76ODAfgKguUQ.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8bfde320cc83" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Swift Factorial Program using For-in Loop]]></title>
            <link>https://medium.com/@muraliyarramsetti/swift-factorial-program-using-for-in-loop-e348492c09eb?source=rss-340cd94b2179------2</link>
            <guid isPermaLink="false">https://medium.com/p/e348492c09eb</guid>
            <dc:creator><![CDATA[Murali Yarramsetti]]></dc:creator>
            <pubDate>Thu, 06 Apr 2023 17:16:29 GMT</pubDate>
            <atom:updated>2023-04-06T17:16:29.359Z</atom:updated>
            <content:encoded><![CDATA[<pre>func factorialCheck(val: Int) -&gt; Int {<br>var result = 1<br>if(val &gt; 0) {<br>for i in 1...val {<br>result *= i<br>}<br>}<br>return result<br>}<br>let num = 4<br>let result = factorialCheck(n: num)<br>print(&quot;\(num)! = \(result)&quot;)<br>24</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e348492c09eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[iOS Alertview Controller]]></title>
            <link>https://medium.com/@muraliyarramsetti/ios-alertview-controller-2df469287869?source=rss-340cd94b2179------2</link>
            <guid isPermaLink="false">https://medium.com/p/2df469287869</guid>
            <dc:creator><![CDATA[Murali Yarramsetti]]></dc:creator>
            <pubDate>Fri, 31 Mar 2023 14:13:19 GMT</pubDate>
            <atom:updated>2023-03-31T14:13:19.903Z</atom:updated>
            <content:encoded><![CDATA[<h3>iOS Alerview Controller</h3><pre>let alert = UIAlertController(title: &quot;Alert&quot;, message: &quot;Message&quot;, preferredStyle: .alert)<br>alert.addAction(UIAlertAction(title: &quot;OK&quot;, style: .default, handler: { action in<br>    switch action.style{<br>        case .default:<br>        print(&quot;default&quot;)<br>        <br>        case .cancel:<br>        print(&quot;cancel&quot;)<br>        <br>        case .destructive:<br>        print(&quot;destructive&quot;)<br>        <br>    }<br>}))<br>self.present(alert, animated: true, completion: nil)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2df469287869" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[iOS Application lifecycle]]></title>
            <link>https://medium.com/@muraliyarramsetti/ios-application-lifecycle-c76bd682951?source=rss-340cd94b2179------2</link>
            <guid isPermaLink="false">https://medium.com/p/c76bd682951</guid>
            <dc:creator><![CDATA[Murali Yarramsetti]]></dc:creator>
            <pubDate>Fri, 31 Mar 2023 13:27:55 GMT</pubDate>
            <atom:updated>2023-03-31T13:27:55.358Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/415/1*u4df9bZQcTh4m3EPxXr68Q@2x.png" /></figure><ul><li><strong>application:willFinishLaunchingWithOptions: </strong>This method is called after your application has been launched successfully. It is the first method from our app delegate, which will be called. You can execute your code if the launch was successful.</li><li><strong>application:didFinishLaunchingWithOptions: </strong>This method is called before the app’s window is displayed. You can finalize your interface and can provide the root ViewController to the window.</li><li><strong>applicationDidBecomeActive: </strong>This method is either called to let your app know that it moved from the inactive to active state or your app was launched by the user or the system or in case user ignores an interruption (such as an incoming phone call or SMS message) that sent the application temporarily to the inactive state. You should use this method to restart any tasks that were paused (or not yet started) while the app was inactive.</li><li><strong>applicationWillResignActive: </strong>This method is called to let your app know that it is about to move from active to inactive state. This can happen in case of any interruptions (such as an incoming phone call or SMS message or Calendar alerts) or when the user quits the app. You should use this method to pause any ongoing tasks or disable timers etc.</li><li><strong>applicationDidEnterBackground: </strong>This method is called to let the app know that it is not running in the foreground. In case you need additional time, you can request additional execution time from the system by calling <strong>beginbackgroundTask(expirationHandler:).</strong></li><li><strong>applicationWillEnterForeground: </strong>This method is called as a part of the transition from the background to the active state. You should use this to undo any change you made to your app upon entering the background. <strong>applicationDidBecomeActive</strong> method is called soon after this method has finished its execution which then moves the app from the inactive to the active state.</li><li><strong>applicationWillTerminate: </strong>This method is called to let you know that your app is about to terminate. You should use this method to perform any final clean-up task. If the method does not return before time expires, the system may kill the process altogether. This method may be called in situations where the app is running in the background (not suspended) and the system needs to terminate it for some reason. You shouldn’t wait for <strong>applicationWillTerminate</strong> to be called in order to save your data. There are some cases when <strong>applicationWillTerminate</strong> won’t be called before app termination.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yzf3xariiYQZwx_Xkg4s4w.jpeg" /></figure><ul><li><strong>Not Running — </strong>Either the application has not started yet or was running and has been terminated by the system.</li><li><strong>Inactive:- </strong>An application is running in the Foreground but is not receiving any events. This could happen in case a Call or Message is received. An application could also stay in this state while in the transition to a different state. In this State, we can not interact with the app’s UI.</li><li><strong>Active:- </strong>An application is running in the Foreground and receiving the events. This is the normal mode for the Foreground apps. The only way to go to or from the Active state is through the Inactive state. The user normally interacts with UI and can see the response/result for user actions.</li><li><strong>Background:- </strong>An application is running in the background and executing the code. Freshly launching apps directly enter into In-Active state and then to Active state. Apps that are suspended, will come back to this background state, and then transition to In-Active → Active states. In addition, an application being launched directly into the background enters this state instead of the inactive state.</li><li><strong>Suspended:- </strong>An application is in the background but is not executing the code. The system moves the application to this state automatically and does not notify. In case of low memory, the system may purge suspended application without notice to make free space for the foreground application. Usually, after 5 secs spent in the background, apps will transition to Suspend state, but we can extend the time if the app needs.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c76bd682951" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>