Snippets Collections
// MARK: - Table View

topPlayersTableView.delgate = self
topPlayersTableView.dataSource = self


extension HomeViewController : UITableViewDelegate, UITableViewDataSource {
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 10
    }
    
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = topPlayersTableView.dequeueReusableCell(withIdentifier: "TopPlayerTableViewCell") as! TopPlayerTableViewCell
        return cell
    }
}
   func setView() {
     
        [emailView, passwordView].forEach { (view) in
            if let view = view {
                view.layer.borderWidth = 2
                view.layer.borderColor = hexStringToUIColor(hex: "E9E9E9").cgColor
                view.layer.cornerRadius = view.layer.frame.height/3
            }
        }
    }
// 1st method

if let storyboard = self.storyboard {
            let vc = storyboard.instantiateViewController(withIdentifier: "ForgotPasswordViewController") as! ForgotPasswordViewController
            vc.modalPresentationStyle = .fullScreen
            self.present(vc, animated: false, completion: nil)
        }

// 2nd method

    func nextVC(identifier: String) {
        if let storyboard = self.storyboard {
            let vc = storyboard.instantiateViewController(withIdentifier: identifier)
            vc.modalPresentationStyle = .fullScreen
            self.present(vc, animated: false, completion: nil)
        }
    }
Issue: place parentview at top of all views, buttons, labels

    
    public static var BottomBarVC: BottomBarViewController!
    public static var parentViewHeight: CGFloat = 0
    
    var homeVC : HomeViewController!
    var favoriteVC : FavouriteItemsViewController!
    var profileVC : ProfileViewController!
    
    override func viewDidLoad() {
        super.viewDidLoad()

        BottomBarViewController.BottomBarVC = self
        BottomBarViewController.parentViewHeight = self.parentView.frame.height
        
        assignViewControllers()
//        setScanImage()
    }
    
    func assignViewControllers() {
        let storyboard = UIStoryboard(name: "Main", bundle: nil)
        homeVC = storyboard.instantiateViewController(withIdentifier: "HomeViewController") as? HomeViewController
        favoriteVC = storyboard.instantiateViewController(withIdentifier: "FavouriteItemsViewController") as? FavouriteItemsViewController
        profileVC = storyboard.instantiateViewController(withIdentifier: "ProfileViewController") as? ProfileViewController
        
        embedHomeVC()
    }
    
    func embedHomeVC() {
        AppDelegate.embed(self.homeVC, inParent: self, inView: self.parentView)
    }
    
    @IBAction func homeButtonPressed(_ sender: Any) {
      // C59104
      // 9A9A9A
        
        homeImageView.image = UIImage(named: "home_sel")
        homeLabel.textColor = hexStringToUIColor(hex: "C59104")
        
        favoriteImageView.image = UIImage(named: "favorite_unsel")
        favoriteLabel.textColor = hexStringToUIColor(hex: "9A9A9A")
        
        shoppingImageView.image = UIImage(named: "shopping_unsel")
        shoppingLabel.textColor = hexStringToUIColor(hex: "9A9A9A")
        
        profileImageView.image = UIImage(named: "profile_unsel")
        profileLabel.textColor = hexStringToUIColor(hex: "9A9A9A")
        
        AppDelegate.embed(self.homeVC, inParent: self, inView: self.parentView)
    }
    
    @IBAction func favoriteButtonPressed(_ sender: Any) {
      
        homeImageView.image = UIImage(named: "home_unsel")
        homeLabel.textColor = hexStringToUIColor(hex: "9A9A9A")
        
        favoriteImageView.image = UIImage(named: "favorite_sel")
        favoriteLabel.textColor = hexStringToUIColor(hex: "C59104")
        
        shoppingImageView.image = UIImage(named: "shopping_unsel")
        shoppingLabel.textColor = hexStringToUIColor(hex: "9A9A9A")
        
        profileImageView.image = UIImage(named: "profile_unsel")
        profileLabel.textColor = hexStringToUIColor(hex: "9A9A9A")
        
        AppDelegate.embed(self.favoriteVC, inParent: self, inView: self.parentView)
    }
    
    @IBAction func shoppingButtonPressed(_ sender: Any) {
      
        homeImageView.image = UIImage(named: "home_unsel")
        homeLabel.textColor = hexStringToUIColor(hex: "9A9A9A")
        
        favoriteImageView.image = UIImage(named: "favorite_unsel")
        favoriteLabel.textColor = hexStringToUIColor(hex: "9A9A9A")
        
        shoppingImageView.image = UIImage(named: "shopping_sel")
        shoppingLabel.textColor = hexStringToUIColor(hex: "C59104")
        
        profileImageView.image = UIImage(named: "profile_unsel")
        profileLabel.textColor = hexStringToUIColor(hex: "9A9A9A")
    }
    
    @IBAction func profileButtonPressed(_ sender: Any) {
      
        homeImageView.image = UIImage(named: "home_unsel")
        homeLabel.textColor = hexStringToUIColor(hex: "9A9A9A")
        
        favoriteImageView.image = UIImage(named: "favorite_unsel")
        favoriteLabel.textColor = hexStringToUIColor(hex: "9A9A9A")
        
        shoppingImageView.image = UIImage(named: "shopping_unsel")
        shoppingLabel.textColor = hexStringToUIColor(hex: "9A9A9A")
        
        profileImageView.image = UIImage(named: "profile_sel")
        profileLabel.textColor = hexStringToUIColor(hex: "C59104")
        
        AppDelegate.embed(self.profileVC, inParent: self, inView: self.parentView)
    }
    func setScrollView() {
        let contentWidth = topPlayersTableView.layer.frame.width + 20
        scrollView.contentSize = CGSize(width: contentWidth, height: scrollView.frame.height)
        scrollView.isPagingEnabled = true
    }
   func setProfileImage() {
        profileImageView.frame.size = CGSize(width: profileImageView.frame.height,
                                                  height: profileImageView.frame.height)
        profileImageView.layer.cornerRadius = profileImageView.layer.frame.height/2
        profileImageView.center.x = view.center.x
    }
const http = require('http');  
// Create an instance of the http server 
// to handle HTTP requests
let app = http.createServer((req, res) => {
    // Set a response type of plain text 
//     for the response
...    res.writeHead(200, {'Content-Type': 'text/plain'});
    // Send back a response and end the connection
...    res.end('Hello World!\n');
});
// Start the server on port 3000
app.listen(3000, '127.0.0.1');
console.log('Node server running on port 3000');
[su_slider source="media: 1650,1648,1649" link="image" target="blank" responsive="yes" title="no" arrows="yes" pages="no" mousewheel="no"]
[su_animate type="bounceIn" duration="1"]Animated content[/su_animate]
[su_tooltip title="Tooltip title" text="Tooltip content" position="top" background="#222222" color="#FFFFFF" font_size="16" text_align="left" max_width="300" radius="5" shadow="no" behavior="hover" class="" outline="yes" tabindex="yes" reference_tag="span" hide_delay="0"] Hover me to open tooltip [/su_tooltip]
[su_dropcap style="default" size="3"]L[/su_dropcap]orem ipsum dolor sit amet, consectetur adipiscing elit. Aenean urna nisl, sodales et mauris eget, egestas ullamcorper tellus. Quisque suscipit turpis a libero ultrices, non pharetra velit ornare.
[su_photo_panel color="#F73F43" border="1px solid #F73F43" radius="3" text_align="center" photo="https://getshortcodes.com/wp-content/uploads/2017/08/slider-image-1.jpg" url="#"]This is photo panel[/su_photo_panel]
[su_row]
[su_column size="1/3"]
[su_panel]Panel content[/su_panel]
[/su_column]
[su_column size="1/3"]
[su_panel]Panel content[/su_panel]
[/su_column]
[su_column size="1/3"]
[su_panel]Panel content[/su_panel]
[/su_column]
[/su_row]
[su_panel color="#F73F43" border="1px solid #F73F43" radius="3" text_align="center" url="#"]Panel content. You can use any <strong>HTML markup</strong> or even other shortcodes here.[/su_panel]
<strong>Mixed content</strong>
[su_content_slider effect="goDown" autoplay="0" style="dark" pages="yes"]
[su_content_slide]
[su_spoiler title="Spoiler shortcode" style="fancy" icon="plus-square-1"]Hidden content[/su_spoiler]
[/su_content_slide]
[su_content_slide]
[su_service title="Service shortcode" icon="icon: star" icon_color="#fccb00"]Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ligula libero, placerat ac pellentesque eget, adipiscing eu sapien. In venenatis, orci sed fringilla eleifend, nulla urna egestas arcu, quis consectetur felis purus sed metus. Quisque convallis lobortis neque, vitae rutrum urna mattis quis. Donec molestie tempor mattis. Sed elementum, est vitae tincidunt faucibus, metus dui lobortis orci, non auctor ipsum elit quis nunc. Integer nec mattis nunc, eu dapibus nisl. Proin in eleifend lorem. Praesent mattis eros in orci aliquet fermentum.[/su_service]
[su_box title="Box shortcode" box_color="#dddddd" title_color="#393939"]Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ligula libero, placerat ac pellentesque eget, adipiscing eu sapien. In venenatis, orci sed fringilla eleifend, nulla urna egestas arcu, quis consectetur felis purus sed metus. Quisque convallis lobortis neque, vitae rutrum urna mattis quis.[/su_box]
[/su_content_slide]
[su_content_slide]
[su_row][su_column size="1/2"]
<h3>YouTube video</h3>
[su_youtube url="http://www.youtube.com/watch?v=DR2c266yWEA"]
[/su_column][su_column size="1/2"]
<h3>Google map</h3>
[su_gmap]
[/su_column][/su_row]
[/su_content_slide]
[/su_content_slider]
[su_icon icon="icon: star" background="#eeeeee" color="#F73F43" text_color="#F73F43" size="32" shape_size="16" radius="256" text_size="16" url="#" target="self" margin="0"] This is a custom icon [/su_icon]
star

Fri Jan 27 2023 17:21:38 GMT+0000 (Coordinated Universal Time)

#ios #swift #table #tableview #snippet
star

Fri Jan 27 2023 17:17:47 GMT+0000 (Coordinated Universal Time)

#ios #swift #view #snippet
star

Fri Jan 27 2023 17:13:07 GMT+0000 (Coordinated Universal Time)

#ios #swift #vc #next #nextvc #snippet
star

Fri Jan 27 2023 17:06:39 GMT+0000 (Coordinated Universal Time)

#ios #swift #bottombar #bottom #tab #tabbar #snippet #snipet #snipit #code
star

Wed Jan 25 2023 15:36:09 GMT+0000 (Coordinated Universal Time) https://chat.openai.com/chat/07129f0f-4c3a-4dc4-892c-f0353b6ad551

#ios #swift #scroll #horizontal #snippet
star

Tue Mar 15 2022 11:50:41 GMT+0000 (Coordinated Universal Time)

#ios #swift #profileimage #image #profile #snippet
star

Sat Feb 26 2022 08:28:58 GMT+0000 (Coordinated Universal Time) http://psyopwriter.com

#https #server #javascript #serverup #snippet
star

Sat Jan 08 2022 08:25:56 GMT+0000 (Coordinated Universal Time) https://getshortcodes.com/docs/slider/

#slider #wp #snippet
star

Sat Jan 08 2022 08:24:30 GMT+0000 (Coordinated Universal Time) https://getshortcodes.com/docs/animation/

#animation #snippet
star

Sat Jan 08 2022 08:24:04 GMT+0000 (Coordinated Universal Time) https://getshortcodes.com/docs/tooltip/

#tooltip #snippet #wp
star

Sat Jan 08 2022 08:18:33 GMT+0000 (Coordinated Universal Time) https://getshortcodes.com/docs/dropcap/

#snippet #shortcode #wp
star

Sat Jan 08 2022 08:06:15 GMT+0000 (Coordinated Universal Time) https://getshortcodes.com/docs/photo-panel/

#img #snippet #shortcode
star

Sat Jan 08 2022 08:05:21 GMT+0000 (Coordinated Universal Time) https://getshortcodes.com/docs/panel/

#snippet #column #wp
star

Sat Jan 08 2022 08:04:55 GMT+0000 (Coordinated Universal Time) https://getshortcodes.com/docs/panel/

#snippet #wp #shortcode
star

Sat Jan 08 2022 08:03:22 GMT+0000 (Coordinated Universal Time) https://getshortcodes.com/docs/content-slider/

#snippet #wp #shortcode #slider
star

Sat Jan 08 2022 08:01:28 GMT+0000 (Coordinated Universal Time) https://getshortcodes.com/docs/icon/

#snippet #wp #shortcode #icon

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension