I got an image,which is shorter than button's width, so I want to stretch the image's both sides to fit button's width but not stretch its center because there is text in center. What should I do to achieve that? Appreciate your suggestion!
stretch image's both sides but not center for uibutton
895 views Asked by John At
2
There are 2 answers
Related Questions in IOS
- URLSession requesting JSON array from server not working
- Incorrect display of LinearGradientBrush in IOS
- Module not found when building flutter app for IOS
- How to share metadata of an audio url file to a WhatsApp conversation with friends
- Occasional crash at NSURLSessionDataTask dataTaskWithRequest:completionHandler:
- Expo Deep linking on iOS is not working (because of Google sign-in?)
- On iOS, the keyboard does not offer a 6-character SMS code
- Hi, there is an error happened when I build my flutter app, after I'm installing firebase packages occurs that error
- The copy/paste functionalities don't work only on iOS in the Flutter app
- Hide LiveActivityIntent Button from Shortcuts App
- While Running Github Actions Pipeline: No Signing Certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID
- Actionable notification api call not working in background
- Accessibility : Full keyboard access with scroll view in swiftui
- There is a problem with the request entity - You are not allowed to create 'iOS' profile with App ID 'XXXX'
- I am getting "binding has not yet been initialized" error when trying to connect firebase with flutter
Related Questions in UIIMAGE
- UIImage Resizing Works, but Reverts to Original Size When Converted to Data for Upload
- Fail to Upload an Image into Firebase Storage
- Is there a way to actually change the background color in UIImage.SymbolConfiguration of a system image? Or is it always clear?
- Check in UIImage.init existence of image in bundle
- How to compress Image without losing metadata?
- setup all of the properties of the stack view
- Changing the color UIImage
- UIImage in Swift only loads after triggering twice
- Cannot generate image which is then shared
- Memory leak issue trying to combine [UIImage] to single GIF image
- Padding around UIImage in a UIImageView with a background color
- Add an image to a subclass of UIVIew
- How to resize image to have maximum width of 1280px
- How to prompt for access again after UIImageWriteToSavedPhotosAlbum in Swift
- Convert a String to Data in Swift
Related Questions in STRETCH
- Flutter tab bar view stretches content because of expanded
- WPF - stretch image to fit area
- print Bitmap to A4 size without stretch
- flutter stretch an SVG vertically in a Stack according to the size of the Stack
- How to stretch the text horizontally like we stretch an image horizontally or vertically in pdfmake or change the width of text
- Interactive Matplotlib colorbar "stretchable" like DS9 or QFitsView colorbar
- How to have a window size that adapts to its content size and vice versa?
- Images and Buttons not filling grid cells WPF XAML
- Maximize Window to Have Client Area Just Fill Screen Issue (Windows 10, Win32 DLL)
- Couldn't download package from local repository for debian dists with nginx as a web server
- Expanded in SingleChildScrollView crashes the application
- CSS Flex: first child stretch, other children wrap
- Problem in android splash screen ---- stretched
- Stretchy Header with UIPageViewController
- Crop/copy stretched image in WPF
Related Questions in UIEDGEINSETS
- How to add edge insets to UICollectionView's contentView when using UICollectionViewCompositionalLayout of type .list
- How to get indexpath.row insde insetForSectionAt to give different size for different indexpath.row
- SwiftUI Path.inset(in:) function
- Left Aligning a subview to UINavigationBar Large Title
- Swift UIButton .contentVerticalAlignment property doesn't work good
- UITableViewController's tableView's Content insets
- How to deal with temporarily incorrect SafeAreaInsets?
- How can I center Buttons within UICollectionViewFlowLayout for two columns? Might there be a more efficient way to solve this?
- How do you use UIEdgeInsets?
- iOS 14 and Simulator UILabel extension padding bug
- How to remove NavigationBar Right space?
- UIEdgeInsets not working on System Images in TabBar
- iOS System Icons not respecting UIButton's UIImageInsets
- swift UIPrintPageRenderer printableRect.size.width is always zero (0)
- Make UITableView ignore Safe Area
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Look for resizableImageWithCapInsets method of UIImage.
When 10 parameter is the margin of the text inside the image.
This creates a new UIImage that you can stretch.