Questions tagged [modifier]
347 questions
1
vote
1 answer
SwiftUI: is possible Gesture var move into EnvironmentObject?
I am not familiar with SWIFTUI and closure. Here move some gesture code to extension function, except var drag.
For Gesture, Is is possible to move the drag into environmentObject? How to initialize ?
class ViewState:ObservableObject {
…

Spuggy L
- 21
- 3
1
vote
0 answers
How does modifiers(as in xmodmap) work under linux operating system?
I learned that xmodmap has 8 modifiers, and I can add keysyms to modifiers. However, I am increasingly confused about modifiers. How do they work?
$ xmodmap -pm
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L…

DeanSinaean
- 2,297
- 4
- 16
- 19
1
vote
0 answers
Modifier Removes Morph Targets GLTF
I want to export a GLTF file. I selected the apply modifier option on export to show my full mesh (I used a mirror modifier) but doing so removed all my morph targets. How do I export the file with the mirror modifier and keep all my…

bella
- 43
- 5
1
vote
1 answer
Is there a way to animate navigationbaritems with withAnimation(...?
For some reason the SwiftUi withAnimation does not work in the navigationBarItems modifier. Is there a fix for that? I know the .animation modifier on the view that is animated works but this is not enough for more complex animations.
I was…

NilsBerni
- 83
- 2
- 13
1
vote
2 answers
Can Anyone explain why this code does not work?
I am trying to do a substitution of some variables into a string.
The hash contains the data, the $name string is the format.
It will put in two of the variable but not the %M one.
I am baffled. I have tried two different signal characters and…

Alan Wilson
- 29
- 3
1
vote
1 answer
private[this] Vs giving parameters without val/var in scala
I understand that marking a val/var as private[this] inside a class and providing a class parameter without val/var is same.
class ABC (x:Int){..}
class ABC {
private[this] x:Int = 100
}
In both the cases, x can be accessed by only the…

user3103957
- 636
- 4
- 16
1
vote
5 answers
modifiers for multiple objects in java
it is possible to do something like this in java?
static public final {
String A = "a...";
int B = 3;
boolean C = true;
}
thanks!
EDIT: sorry i made a mistake in my example.. I don't need only Strings..

frx08
- 4,222
- 8
- 37
- 45
1
vote
1 answer
How to change the alignment of a view without changing its width or height
I'm trying to adjust the alignment of a Text view in SwiftUI. Though I don't want to adjust its width or height using the .frame modifier. I'm looking for something like this:
struct ContentView: View {
var body: some View {
Text("Hello…

Evan93
- 155
- 11
1
vote
1 answer
What is the certutil syntax to add in a modifier like "ExtendedProperties"
I am trying to find out where to put the modifier "ExtendedProperties" in the certutil -p "abcd" -exportPFX.... What would the syntax look like?

john.trussell
- 11
- 2
1
vote
1 answer
Swift: conditional modifier for .font of text()
I am new with Swift an still learning. I tried to format a text based on a boolean variable. It works well with font size and style. But it won't work with styles like .bold() or .italic. Any idea how to do this? I tried ViewModifier too, but there…

Enrico
- 148
- 11
1
vote
1 answer
SwiftUI: Modifier inside Array
I'm currently trying to put all possible modifiers directly into an array and then call them via forEach. It works with most of them too, unfortunately with frame (height, width, alignmet) not as I would like. Text and frame should align at the same…

dankell
- 61
- 1
- 6
1
vote
1 answer
How to detect Caps Lock status on macOS with Swift without a window?
I have tried KeyDown and NSEvent, but they require a NSWindow object to be active. My hope is that I can put an app on the status bar and alert the user when it has pressed CapsLock, even if the user is in any other app. My app idea doesn't have a…

Ryuuzaki Julio
- 369
- 1
- 14
1
vote
2 answers
Why i should incorporate a length modifier as argument in scanf()-family members? What is the benefit of? What does scanf with the length modifier do?
There is the optional opportunity to incorporate a length-modifier as argument to the statement of scanf() or one of its family members.
Why should i implement a length modifier in the statement exactly, whether i´ve already declared the assigning…

RobertS supports Monica Cellio
- 14,524
- 7
- 33
- 80
1
vote
2 answers
How to obtain specific modifier properties information through bpy.types?
for example I got:
bpy.types.Modifier.bl_rna.properties['type'].enum_items[12]
(boolean modifier)
The Boolean modifier has a property called "object" for the actual bool mesh.
How can I quickly check if it actually got the "object" property…

rbx775
- 11
- 4
1
vote
2 answers
Issue with C# inheritance when using Generics and 'new' modifier to hide a parent's member
I'm trying to create a class hierarchy with 2 levels
where the 2nd level overrides one of the properties (e.g. Id).
// Level 1
public class Level1 : IEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id {…

Alex Monkey
- 1,427
- 1
- 14
- 16