i am trying to create a mechanism for changing user's profile image same as whatsapp does , here's how it looks :
this is what i want to achieve
and this is what i have :
in the second image the background of scrollView is in purple colour i want to add here a UIImageView + UIEffectView as shown in the first image which will be immovable (fixed at position ) but i dont know where to start if anybody knows how am gonna do this than please let me know it'll be so helpful for me. thanks
Related
I am trying to make a feature where a user can see if someone is online or offline. If there are online there is a small green dot on the image, and red if offline.
How can I build this? I have the circle image working but I am not sure how to add the green dot on it.
I am using Storyboards and UINibs. So I assumed I would need to make a UIView, not sure exactly how to place it.
I can build this in Swift UI, so is it possible to buildit in swiftUI, and add that image to a UICollectionView Cell?
Just palce a label with a "." text in it, make the font as big as you would like it to be, apply constrains on it and then just change: myLabel.textColor = UIColor.green / myLalbel.textColor = UIColor.gray or whatever fits you, also note that you can apply centering of the text inside the label.
I went with adding a UIImageView over that image, and used the SFSymbol "circle.fill"
I then used the ternary operator to determine the state.
Does anyone know how get the NSTextAttachment image's position centre in UITextView?
I'm working on an app that allow user to input text and image in a UITextView, and when user click on an image, it will show the image viewer for all images. This is easy, and I have get this done.
Now, I need to create a custom transition from UITextView (in a UIViewController) to the image viewer, I'm struggling to find each image's centre in the UITextView so I can create a snapshot for the custom transitioning.
The custom transitioning is basically the same as iOS "Note" app, when tap on an image, then create an snapshot, move it the right position.
I appreciate any help or idea to solve this problem.
I’m trying to make simple meme app using Swift.I need to set up image at full screen.You can see Main StoryBoard with constraints here. But when im picking image that must fill full screen in portrait as result there is blank spaces in top and bottom. Similarly with landscape image but now spaces are on right and left. Anyone know how to fix this?
Set your UIImageView's contentMode to aspectFill.
Either in the storyboard…
or in code…
imageView.contentMode = .aspectFill
You can also implement a very handy third party library, easy to use : https://github.com/JanGorman/Agrume
It enables you to handle every kind of gestures, interactions, zooms etc.. on your UIImageView.
Thus, you won't have to worry about portrait/landscape constraints.
#Ashley Mills answer is the answer, mine is just an advice.
From past few days i have been trying to achieve scrolling of a background image using storyboard, but couldn't achieve it. If anyone can help me out that is much appreciable. I am attaching a snapshot of my storyboard along with this question if i need to do anything more for your clear understanding please let me know
Try to increase your content size of UIScrollView and also set the background image having equal size of width and height to ur UIScrollView.
I have a UIImageView with a UIImage I set directly in the Storyboard/IB. I've also selected the Scale to Fill Mode
And this is what it looks like in IB/Storyboard:
However when I run the app it looks like this:
Any ideas on how I could fix this? I've tried changing mode in the storyboard/IB to say for example the center mode, this however just gives me a part of the image taken from the center of it.
Seems that I didn't connect constraints to all points. Doing so and making sure all constraint lines were blue solved it.