Close Menu
  • Home
  • AI
  • Big Data
  • Cloud Computing
  • iOS Development
  • IoT
  • IT/ Cybersecurity
  • Tech
    • Nanotechnology
    • Green Technology
    • Apple
    • Software Development
    • Software Engineering

Subscribe to Updates

Get the latest technology news from Bigteetechhub about IT, Cybersecurity and Big Data.

    What's Hot

    Will Outrageous Gas Prices Restart the EV Boom?

    May 12, 2026

    Four ways Google Research scientists have been using Empirical Research Assistance

    May 12, 2026

    Streamlined monitoring and debugging for Amazon EMR on EC2

    May 12, 2026
    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    Big Tee Tech Hub
    • Home
    • AI
    • Big Data
    • Cloud Computing
    • iOS Development
    • IoT
    • IT/ Cybersecurity
    • Tech
      • Nanotechnology
      • Green Technology
      • Apple
      • Software Development
      • Software Engineering
    Big Tee Tech Hub
    Home»iOS Development»ios – How to add shadow to border?
    iOS Development

    ios – How to add shadow to border?

    big tee tech hubBy big tee tech hubMay 12, 2026001 Min Read
    Share Facebook Twitter Pinterest Copy Link LinkedIn Tumblr Email Telegram WhatsApp
    Follow Us
    Google News Flipboard
    ios – How to add shadow to border?
    Share
    Facebook Twitter LinkedIn Pinterest Email Copy Link


    Basically shadow applies to the whole layer not just the border. You may need to try like below:-

    enter image description here

    import UIKit
    
    class GlowButton: UIButton {
    
        private let gradientLayer = CAGradientLayer()
    
        override init(frame: CGRect) {
            super.init(frame: frame)
    
            setupUI()
        }
    
        required init?(coder: NSCoder) {
            super.init(coder: coder)
    
            setupUI()
        }
    
        private func setup() {
            setTitle("▶ Start watching your Channel’s here", for: .normal)
            setTitleColor(.white, for: .normal)
            titleLabel?.font = UIFont.boldSystemFont(ofSize: 20)
            layer.cornerRadius = 16
            clipsToBounds = false
            layer.borderWidth = 2
            layer.borderColor = UIColor(red: 1, green: 0.2, blue: 0.4, alpha: 1).cgColor
            layer.shadowColor = UIColor.red.cgColor
            layer.shadowOpacity = 0.9
            layer.shadowRadius = 15
            layer.shadowOffset = .zero
            gradientLayer.colors = [
                UIColor(red: 0.5, green: 0, blue: 0.1, alpha: 1).cgColor,
                UIColor(red: 1, green: 0, blue: 0.2, alpha: 1).cgColor
            ]
    
            gradientLayer.startPoint = CGPoint(x: 0, y: 0.5)
            gradientLayer.endPoint = CGPoint(x: 1, y: 0.5)
    
            gradientLayer.cornerRadius = 16
    
            layer.insertSublayer(gradientLayer, at: 0)
        }
    
        override func layoutSubviews() {
            super.layoutSubviews()
    
            gradientLayer.frame = bounds
        }
    }
    



    Source link

    Add border iOS Shadow
    Follow on Google News Follow on Flipboard
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Copy Link
    tonirufai
    big tee tech hub
    • Website

    Related Posts

    Yamaha’s 2026 AV Receivers Add Style and Dolby Atmos

    May 12, 2026

    How to add AI to an existing product (without annoying users)

    May 12, 2026

    My Outer Loop | Cocoanetics

    May 11, 2026
    Add A Comment
    Leave A Reply Cancel Reply

    Editors Picks

    Will Outrageous Gas Prices Restart the EV Boom?

    May 12, 2026

    Four ways Google Research scientists have been using Empirical Research Assistance

    May 12, 2026

    Streamlined monitoring and debugging for Amazon EMR on EC2

    May 12, 2026

    Tunable polaritonic topologies generated by non-local photonic modes

    May 12, 2026
    Timer Code
    15 Second Timer for Articles
    20
    About Us
    About Us

    Welcome To big tee tech hub. Big tee tech hub is a Professional seo tools Platform. Here we will provide you only interesting content, which you will like very much. We’re dedicated to providing you the best of seo tools, with a focus on dependability and tools. We’re working to turn our passion for seo tools into a booming online website. We hope you enjoy our seo tools as much as we enjoy offering them to you.

    Don't Miss!

    Will Outrageous Gas Prices Restart the EV Boom?

    May 12, 2026

    Four ways Google Research scientists have been using Empirical Research Assistance

    May 12, 2026

    Subscribe to Updates

    Get the latest technology news from Bigteetechhub about IT, Cybersecurity and Big Data.

      • About Us
      • Contact Us
      • Disclaimer
      • Privacy Policy
      • Terms and Conditions
      © 2026 bigteetechhub.All Right Reserved

      Type above and press Enter to search. Press Esc to cancel.