How to use a custom svg icon on an el-input? - element-ui

Is there any way to set a customized icon on the elements (el-input, el-button....) by using a svg?
I already tried (on an el-input):
suffix-icon="require('#/assets/icons/show_blue.svg')"
suffix-icon="#/assets/icons/show_blue.svg"
suffix-icon="show_blue.svg" // by setting the svg on the same dir
with no luck.

Related

ImageView in Xamarin.iOS LaunchScreens: Set image

I want to change/set the image in my launch screen for my Xamarin.iOS App.
Opening LaunchScreen.storyboard in my Visual Studio 2017 (Win10), I get the storyboard editor as expected.
But if I want to change (or even set) the Image-Property of the default ImageView (or a newly added one), the default file open dialogs comes up - and no matter what image file I select, nothing changes.
Do the images for the launch screen storyboard comply some criteria? e.g. filetype? location?
Update:
This is the property I try to set with an image:
As files I tried several PNG images - all working well as images in my normal Xamarin Views or as Icons.
I think your problem is that you can try this way,rebuild your project when you create a new xarmain.ios project.
Try the following steps

Possible to change font size of iOS select input using Ionic

I have a project I am working on in Ionic and the client has asked if the font size can be reduced on the select inputs.
This is a random picture from Google, but shows the select 'scroller' on iOS that I am referencing:
The blue, green and red options are what need smaller font size. I'm pretty sure that it can't be done, easier for me too.
You dont state which version of ionic you are using, so i will assume it is the latest version.
Each component in ionic has assigned sass variables which can be used to target the specific element of the component which can then be used to style it accordingly.
In your theme/variables.scss file you can target a variable which will then override the default style. In your case that would be the font size of the select. Now for this use case the font size is an inherited property and does not have a specific sass variable assigned to it ( you can view all the sass variables for the select here)
So in that case to override the default styles you have to explicitly wrap your scss code with
.ios,.md,.wp{
// your style here
}
From your image it looks like you are using the "action sheet select" style. which would target .action-sheet-ios .action-sheet-button class to change the font size.
.ios{
.action-sheet-ios .action-sheet-selected,
.action-sheet-ios .action-sheet-button{
font-size:1rem;
}
}
This targets ios specifically.
this can be done through css. first serve your app through the lab
ionic serve --lab
Than inspect element from chrome and select your text component and find its class. and Then you can add your custom CSS Styling.
Cheers :D

Using PDFs for icon images in Xcode 7.2

I'm attempting to use PDF files as icons in an app I'm working on. The issue I'm encountering is I'm getting inconsistent tint colors.
If I set a button image from interface builder, the icon image shows up black at runtime. Every time. Regardless of what I attempt to set from interface builder.
I tried setting my button icon image via code and instead of showing up black, it's white:
let myGraphicFile = UIImage(named: "myPDFImage")
let myButtonImage = myGraphicFile?.imageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate)
myButton.setImage(myButtonImage, forState: .Normal)
From code, regardless of what I attempt to set the tint to, it's always white from code.
I discovered this post relating to Xcode 6.x, but I think it might be dated, as I'm able to partially do it, but I can't set the tint.
Use PDF in XCode for an AppIcon (.appiconset collection)
I create the icons in Inkscape, save as PDF 1.5. I add the file to Images.xcassets. In Images.xcassets' attributes inspector, I'm setting:
Devices to Universal
Scale factor to Single Vector.
Summary: I can get it to show up and scale properly, but it's either black from interface builder or white from code. I suspect I'm missing something re: how to save the file from Inkscape.
Thank you for reading. If you have any suggestions, I welcome them.
I have figured out how to create vector icons with Inkscape. When you use PDFs to display icons in iOS, you need to alter the Attributes Inspector for your icon in xcAssets as follows:
1) Drag the PDF into xcAssets
2) Set devices (I did Universal and it worked fine)
3) If your PDF icon is under 1x, 2x, or 3x size class, drag it to Universal and delete the rest of them.
4) Set Scale Factors to Single Vector.
5) Render as Template Image.
Once it's configured there, then you just treat it was you would any other image in interface builder. It's essentially the same thing I was doing in code, but I don't think it gets done in code...it's gotta be done on xcAssets where the image lives. It's my understanding iOS renders vector images for the size class at run time. I think by attempting to tweak it in code wasn't working because the image had already been rendered.
If anyone has any questions on this, I found this link helpful in resolving my issue.
Additionally, this post covers the topic, too. https://stackoverflow.com/a/25804358/4475605

Cursor loading issue

I have a few questions about a custom cursor in XNA, because I'm new.
I'm using:
cursorTex = Content.Load<Texture2D>("ico.png");
where cursorTex is a 2D Texture to load the cursor. However, it says file not found - even though it is in my Content directory. What's wrong and how do I fix this?
How can I set onMouseOver on certain buttons to react to change the cursor's image? And also, how do I change the image when the user is holding click?
Load the texture as
cursorTex = Content.Load<Texture2D>("ico");
instead of
cursorTex = Content.Load<Texture2D>("ico.png");
Edit: seeing you placed your file in a folder, just load it as ...<Texture2D>("other/ico");

ios - UITabBar images are not rendering on the emulator

I have an image that looks like this:
I am trying to make it render on the UITabBar and here is what I did. I went in XCode to File --> Add Files to Project, then I chose the files I wanted and they got added.
Then when I clicked on the files, on the right side of the screen, under "target membership" the checkbox was checked.
But when I added the file name to the UITabBar item, the emulator showed a blank rectangle instead of just empty space...so it recognized the image...but it didn't render that image.
Would someone happen to know what I did wrong? Are the dimensions of the image supposed to be rectangle or square? I have 48x48 square png file.
Can you check your image info?
These are the guidelines for UITabBar image:
30x30 (48x32)
PNG
Anti-aliased
Transparency set
Custom Icon and Image Creation Guidelines

Resources