logo
down
shadow

UIButton not displaying background image on device or simulator


UIButton not displaying background image on device or simulator

By : Cristian Bustos Vasq
Date : November 19 2020, 03:59 PM
help you fix your problem Well, this is Embarrassing.
Turns out I Was Modifying the superview.bounds Due to a Previous Interface Issues and i Forgot About them.
code :


Share : facebook icon twitter icon
Interface builder UIButton custom background image not working on simulator/device

Interface builder UIButton custom background image not working on simulator/device


By : user1836494
Date : March 29 2020, 07:55 AM
hope this fix your issue I found the problem. It wasn't being linked with the Target's Copy Bundle Resources. I don't think I ever had to do this for other resources.
Shouldn't this be done automatically when you add it to the Resources of the project?
Image on UIbutton visible on simulator but lost on device

Image on UIbutton visible on simulator but lost on device


By : zudlone
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further I don't think OS version matters. Just check the case of your image name and the one you are using.
Once it happened to me because of wrong case of the image name. My image name was "portraitbackground.png" and I was writing "PortraitBackground.png". Remember the simulator is running on mac os not iOS. Anyway, just check the case and write exactly what the image name is. I think .png and .PNG would also be treated as different but I haven't experienced it.
UIButton image working on simulator but not on the device

UIButton image working on simulator but not on the device


By : David
Date : March 29 2020, 07:55 AM
will help you Check your image name, because simulator is not case sensitive but the device is case sensitive.
image not displaying on device or in simulator (Xcode)

image not displaying on device or in simulator (Xcode)


By : Beloy Idpan
Date : March 29 2020, 07:55 AM
To fix this issue Ok i solved it myself.
For anybody wondering I just added the .png file manually to the copy bundle resources in build phases
Why is my UIButton Image size different in Simulator and Device?

Why is my UIButton Image size different in Simulator and Device?


By : Phillip Thierman
Date : March 29 2020, 07:55 AM
around this issue from what you described, this can be fixed by simply setting the constraints for each object on your storyboard.
To give you an example of how to do this, I've added two UIImageView objects to the storyboard. Select the first object and press the constraints button at the bottom like in the picture below, and you will need to make sure at least 4 constraints have been set. Specifically, check the HEIGHT, WIDTH and select the distance to LHS and distance to TOP by selecting the corresponding struts which will change to a highlighted orange colour (see picture)
Related Posts Related Posts :
  • CordovaError: Promise rejected with non-error: Error code 65
  • How to append NSMutable strings into a UILabel
  • CustomCell label value does not change
  • Display ad in iAd Bannerview iAd Network
  • Warning: "Could not get traitsetID for iPhone11,6" (Assets.xcassets)
  • Changing root view controller after iOS app has loaded.
  • SocketRocket and iOS certificate pinning
  • Draggable UIButton Snap To a Circle Path
  • Running FireBase in the background
  • resizing UIPopoverController to fit UITableController
  • UICollectionView Exception Crash
  • targeting iOS5 - will it work on iOS6 also?
  • FBLoginView get email
  • Scale UIImages height to UIImageView height
  • Creating a custom progress indicator in ios
  • NSRunLoop API difference
  • Is it possible to inject custom settings into my iOS application "Notifications" settings dialog?
  • UIAlertview not accepting string as message
  • Axis change of stackView giving layout error
  • How to use AVAssetResourceLoader?
  • How to write block definition using properties?
  • iOS connect/reconnect to Bluetooth device when using external-accessory and MFi
  • Saving XMPP Multi User chat messages through XMPP MessageArchiving in iOS
  • Deciding iOS version: pros and cons
  • iOS: Resigned app cannot access keychain through security API
  • How can I set To and Subject fields in an E-Mail being sent by UIDocumentInteractionController?
  • Updating uilabel in view controller underneath another
  • Maximum time Intervel for NSTimer
  • Delete Core Data Entry from Table View Controller
  • How to unload UIViewcontroller from memory?
  • Compressing UIImage as Far as Possible?
  • Optimizing workflow to update internally owned cocoapods dependencies?
  • Formatting an NSDate with Abbreviated Month/Day Names
  • I'm creating a quiz game with 4 answers and I want to add score
  • Tap Gesture to Hide Navigation Bar, Tab Bar, and Status Bar
  • FBSessionStateClosedLoginFailed when I am logged in through Settings
  • CGRect positioning according to center point
  • iOS: Update table view datasource with animations without core data
  • iOS : Where to start for AliPay integration?
  • Routing App Coverage File missing but not needed?
  • Drawing on a zoomable view
  • Append NSStrings and NSNumber to NSMutableArrays and make NSMutable dictionary
  • Terminating app due to uncaught exception 'NSRangeException' when calling dequeueReusableCellWithReuseIdentifier:forInde
  • Collision without physics (Cocos2D + Box2D iOS)
  • Creating a percentage based iOS layout
  • Update tableView row from AppDelegate Swift 4
  • Assigning return value of a class method to a variable error
  • how to display circular progress in delphi ios apps?
  • I can't figure how to fix this Expected identifier or '('
  • How to Test APIs in Swift 4?
  • Link error /Build/Products/Debug-iphonesimulator file not found
  • working with a very large JSON object in iOS
  • Turn off part of the iPhone Screen
  • Phonegap 3.0 app with facebook login using xCode
  • How to add interstitial admob ads to my ios project
  • adding tapku calendar to ios app
  • Add an alertcontroller in a global swift file?
  • Take square image with Cordova (Phonegap) Camera API?
  • Amazon S3 policy allowing only upload not overwrite
  • How to change the UILabel content by tapping?
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org