I want to show Actionsheet with an arrow in my iPad app. I need this arrow to be displayed at a different position (may be based on the object being tapped)
I've done it before using with Rg.Plugins.Popup. I created a frame and added a triangular image below the frame.
https://github.com/rotorgames/Rg.Plugins.Popup
Related
What I want to achieve is to drag red box view and drop in on the aqua boxview. The aqua box view should then take the place of the redbox view. How can I achieve this in Xamarin Forms ? I have added the following XAML code below. Please someone help me with this.
AFAIK Xamarin.Forms does not support drag-n-drop out of the box, hence you'll have to implement it yourself. It won't be easy, since there are certainly some edge cases to consider, but it's achievable. Basically the steps could be (maybe there are other options)
Add an AbsoluteLayout that wraps your Grid
Add an PanGestureRecognizer
When the pan gesture starts, check if it's on the red BoxView
If so, move the red BoxView to the AbsoluteLayout and remove it from the Grid
Move the red BoxView if the pan is updated
When the users stops the pan, check whether the red BoxView where you'd expect it to be dropped
If so, drop it (whatever that means in the context of your app)
If not, animate it back to its original position, remove it from the AbsoluteLayout and add it to the Grid
If you have tried to implement it and are stuck with a more concrete issue, feel free to ask another question about it.
I want to be able to press a button and an image appear on the page.
Additionally, I want to be able to place the button with Y and X coordinates, not through layouts.
Would I need to use an image view?
Your question isn't very precise, so I hope I answer what you need.
To show an Image generally you need an ImageView, that is correct. For less common image formats you might need an external library.
To only show the image when the button is clicked, you have to first set the ImageView to not managed and not visible. Then when the button is clicked make it visible and managed and it will show.
About the absolute positioning of your button, you can override the layout children of any Parent object and set exact positions. Take a look at this question.
I am using Auto layout in my app. I have added constraints on my view. It is working fine in all iPad simulator and iPhone 4s. But when I run this app on iPhone 5s or greater it is showing black bar on left and right side of the screen.
I have also faced this same issue, when I am converting my iPad app to Universal app.
Ref below Image: You can see Main Interface is not set
After that add LaunchScreen.storyboard to your project if not exists.
Ref this Image: Goto your ProjectName-Info.plist add following key
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
Now run the project
Go to your Storyboard. Click on the UIView. Click on the third icon in the auto-layout stuff on the bottom. Now click all of the red line things in the top (stuff circled in pink in below picture) to be set at zero.
EDIT: another possibility is that you have constrained the size of the view in some way. I would try doing reset to suggested constraints, and then set the constraints illustrated above for the background (grey) view so it fills everything up, but do not set it to have an explicit size.
EDIT 2: If that grey thing in the background is a UIImage, I bet the issue is that it is in Aspect Fit. Change the content mode to Aspect Fill and I think it should work.
I want to know exactly where I am placing my images programatically, and therefore need to know the coordinates of my storyboard.
Is there a way to view these from the interface builder in Xcode?
Your workspace dimension is 320X460 suppose you want to add a button programmatically first go into IB and place a button where you want it to be and then in the right side check the coordinates of button in show the size inspector and use those coordinates in your code this will give you a fair idea about where your button will go after you add it programmatically... hope this will help you
NO. Use your imagination. Programmatically added visual objects cannot be seen in IB.
Instead, you could place an object in IB, adjust it's position to the desired one, read it's frame, delete it from IB, and use it's frame values to programmatically add id.
I could not find a way in the documentation to tell an NSButton to resize its image to fill up the whole button. Is there a way to do this programatically?
The closest you'll get is -setImageScaling: ... look up the constants to see how the image will be scaled within the button cell, given its bordered state and bezel type.
If you're looking to replace the standard button entirely with your image (ie, the button cell doesn't draw itself at all - your image serves as the entire visual representation), turn off the border (-setBordered:).
All of these options can be configured in IB as well. A tip: in IB, hover the mouse over any setting in the inspector panel - most if not all give you a hint that shows what method controls the behavior affected by the setting's control.