Tech News, Magazine & Review WordPress Theme 2017
  • Home
  • SMARTHOME
  • PC
  • ANDROID
  • IPHONE
  • AI
  • WEARABLES
  • REVIEW
  • ACCESSORIES
  • STREAMING
No Result
View All Result
kakimotonline
No Result
View All Result
Home

iphone corner case: Ultimate Guide for Max Protection.

by fdsho
12/03/2025
in ACCESSORIES
Reading Time: 2 mins read
0
Share on FacebookShare on Twitter

Okay, so, I’ve been messing around with my iPhone, trying to get those rounded corners on some elements, and I ran into a couple of weird situations. I want to share my little journey here, and hopefully, it helps someone out there.

The Initial Setup

I started simple. I had this UIView, let’s call it myView, and I wanted to give it rounded corners. The obvious thing to do, and what I did, was this:

* = 10.0

* = true

Boom! Rounded corners, right? Most of the time, yeah. But then things got… interesting.

The First “Aha!” Moment

I was adding this myView as a subview to a container view, and the container view also had rounded corners. Guess what? My inner view’s rounded corners were getting clipped! It looked, frankly, awful. It looked a bit squared.

I banged my head against the wall for a bit. I checked, double-checked, and triple-checked the cornerRadius and masksToBounds settings. Everything seemed right.

Then, I realized something. It was the order of operations. I was setting the corner radius of the container view after adding myView as a subview. I switched things around:

  • First, I set the corner radius on the container view.
  • Then, I added myView as a subview.
  • Finally, I set the corner radius on myView.

It worked! The inner view’s rounded corners were now showing correctly, nestled nicely within the rounded corners of the container.

The Shadow Situation

Next challenge! I needed to add a shadow to myView. I am not a fan of shadows but I had to.

I add the below lines of code:

* = *

* = CGSize(width: 0, height: 2)

* = 4.0

* = 0.5

The shadow went all around myView. After a few tries, I remembered that the shadow is also clipped by corner radius.

So, the shadow has to be on a separate view.

I created a new view called shadowView.

  • I set the corner radius of shadowView to be equal to myView’s corner radius.
  • I added myView to shadowView.
  • Then, I added the shadowView to the main container view.

And that, my friends, is how I spent a good chunk of my day wrestling with rounded corners and shadows on an iPhone. It’s the little things, you know? Hopefully, my little adventure saves someone else some time and frustration. It’s always something with these corner cases!

Previous Post

iphone 13 screen protector privacy: Keep Your Screen Hidden!

Next Post

iPhone 14 Pro Max Case Compatibility: What Cases Will Actually Fit?

Related Posts

ACCESSORIES

How to Choose the Right Metal Plate Adhesive Quickly

12/04/2025
ACCESSORIES

Where can you buy a really good iphone 12 privacy screen protector? We review some of the most reliable and popular options available right now.

11/04/2025
ACCESSORIES

Which lens cover iphone is the best choice? Follow these easy tips for perfect camera protection.

11/04/2025

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Refurbished Herman Miller Chairs: Find Great Deals Here!
  • How to Choose the Right Metal Plate Adhesive Quickly
  • Is 256GB enough storage? Lets figure out how many photos can 256gb hold for everyday use.
  • Understanding the 4080 price history guide: Find out when these GPU prices typically start to drop.
  • Where can you buy a really good iphone 12 privacy screen protector? We review some of the most reliable and popular options available right now.
No Result
View All Result

Categories

  • ACCESSORIES (273)
  • AI (284)
  • ANDROID (68)
  • IPHONE (243)
  • PC (291)
  • REVIEW (257)
  • SMARTHOME (278)
  • STREAMING (282)
  • WEARABLES (250)
kakimotonline

© 2025 KKMTON

Navigate Site

  • SMARTHOME
  • IPHONE
  • PC
  • ANDROID
  • WEARABLES
  • AI
  • ACCESSORIES
  • REVIEW
  • STREAMING

Follow Us

No Result
View All Result
  • Home
  • PC
  • AI
  • ANDROID
  • IPHONE
  • SMARTHOME
  • WEARABLES
  • REVIEW
  • ACCESSORIES
  • STREAMING

© 2025 KKMTON