10,593 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
227
views
How does prepareForDisplay work and why does it work without using the decodedImage
I am trying to load an image from a url but it causes major lags in my app due to the amount of images I am loading. I am now calling "prepareForDisplay" on the image I get from inputting ...
0
votes
0
answers
35
views
Getting a sub-UIImage from a UIImageView given a CGRect?
Given a UIImageView, and a CGRect inside that UIImageView, how do I get a sub-UIImage of the UIImage displayed in the UIImageView that is a cut-out of the image matching the CGRect?
I’m struggling to ...
1
vote
0
answers
126
views
Using Symbol in UIImageView automatically resizes the UIImageView size
I am using Simple UIImageView in my code and setting image from symbols. The problem is once I've set symbol, the UIImageView doesn't care about NSLayoutConstrains and It's resizes as it wants.
Is ...
0
votes
1
answer
497
views
Image in SwiftUI takes extra space at bottom while trying to set Aspect Ratio
I want to have Image occupying full width of its container and height will be based on aspect ratio provided explicitly. Also the image should cover all its frame and doesn't matter its content is cut ...
0
votes
0
answers
37
views
Get pixel color from image for certain area - Use result as contrastColor
I have a label which is placed as a subview on an imageView. Depending on the color of the area where the label is set, I want to set the text color of the label as contrast. E. g. if the specific ...
0
votes
2
answers
141
views
Changing the color UIImage
It is necessary to change the color of the image to 00ff00.
But it turns out to 4fff00.
I tried it in two ways. The result is the same.
internal static func imageColorMatrix1(image: UIImage) -> ...
1
vote
1
answer
91
views
UIScrollView automatically scrolls UIImageView to top on pinch-to-zoom
I'm having issues with UIScrollView when doing pinch-to-zoom UIImageView. Implementation is relatively simple which you can find in many places on the Internet. Double tap to zoom in and out works ...
0
votes
1
answer
510
views
Padding around UIImage in a UIImageView with a background color
Basically trying to recreate the small icons like in the iOS Settings app. I have tried numerous techniques from stack over flow and nothing works. I managed to add padding around the UIImage, but the ...
0
votes
1
answer
86
views
After UIImage rotation white lines appear
I face a problem when after UIImage rotation the white lines appear on sides of the image. In my image redactor I have rotateButton. After tapping on it I call this function:
func rotateLeft() -> ...
0
votes
1
answer
198
views
Why CGImage size changed after resize with transparent background? And how to lower the memory cost?
I want to enlarge an image and fill the space with white color.
func resizeImageWithTransparentBackground(originalImage: UIImage, targetSize: CGSize) -> UIImage? {
let originalSize = ...
1
vote
1
answer
436
views
iOS - Obtaining localised system image
I am referring to SF Symbols app for available system icons. If I have to use the asset, I could directly use the systemName to create UIImage. Recently I noticed that there is something called ...
0
votes
1
answer
81
views
Increasing memory usage in iOS using a UISlider to update a UIImageView's image
I'm quite new to Swift and iOS development and I have encountered a issue while building an app.
In a ViewController I have a ScrollView with nested inside a UIView with two UIImageView children ...
-1
votes
1
answer
52
views
UIImageview is not scaling to its frame when image is set
Here I have attached the screenshot that I have worked. I am facing an issue that image view is not scaling to the frame. I have created a custom view within the custom view i have added imageview and ...
0
votes
1
answer
42
views
Cannot force image to be rounded in custom UIImageView
I have a custom UIImageView that acts like a 'carousel' in that users can swipe it to see an image (which, by the way, I adapted from this excellent post on Medium.
I want the corners to be rounded to ...
0
votes
0
answers
27
views
How do I make several ImageViews scale based on the screen size without changing their position relative to each other?
A part of an app I'm making in Kotlin in Android Studio contains a map with provinces. (See image) Replication of map of the Netherlands All of the provinces are different ImageViews, because I need ...