# IOS SDK

**Step 1**: Create a UIButton for the floating button

```
  let fabButton: UIButton = {
            let button = UIButton()
            button.setImage(UIImage(systemName: "plus.circle.fill"), for: .normal)
            button.tintColor = .white
            button.backgroundColor = .systemBlue
            button.layer.cornerRadius = 28 // Adjust the size as needed
            button.layer.shadowColor = UIColor.black.cgColor
            button.layer.shadowOffset = CGSize(width: 0, height: 3)
            button.layer.shadowRadius = 3
            button.layer.shadowOpacity = 0.7
            button.translatesAutoresizingMaskIntoConstraints = false
            return button
        }()
```

**Step 2**: Add the floating button to the view hierarchy and the FAB to the view controller's view

```
  override func viewDidLoad() {
        super.viewDidLoad()
        self.navigationController?.setNavigationBarHidden(false, animated: false)
        let myURL = URL(string:"https://shorts-stg.saleassist.ai/source/e7a1dac1-56d1-445c-b1e3-bd6a487cda6b/")
        let myRequest = URLRequest(url: myURL!)
        webView.load(myRequest)
        
        // Add the floating button to the view hierarchy
        // Add the FAB to the view controller's view
                view.addSubview(fabButton)
                // Configure FAB constraints to position it at the bottom-right corner
                fabButton.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -16).isActive = true
                fabButton.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -16).isActive = true
                fabButton.widthAnchor.constraint(equalToConstant: 56).isActive = true
                fabButton.heightAnchor.constraint(equalTo: 
                fabButton.widthAnchor).isActive = true
                // Add a tap action to the FAB
                fabButton.addTarget(self, action: #selector(fabTapped), for: .touchUpInside)
 
    }

    @objc func fabTapped() {
        
        let  newViewController:UIViewController = (self.storyboard?.instantiateViewController(withIdentifier:  "NewViewController") as? NewViewController)!
        self.navigationController?.pushViewController(newViewController, animated: true)
        
        }

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.saleassist.ai/integration-guide/mobile-sdk-integration/ios-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
