xamarin.ios

What is the equivalent of CGImageCreateWithImageInRect in MonoTouch?

我与影子孤独终老i 提交于 2021-02-05 03:54:21
问题 What is the equivalent of CGImageCreateWithImageInRect iOS method in MonoTouch? I'm trying to convert this Objective-C line in C#: CGImageRef sampleImageRef = CGImageCreateWithImageInRect(self.CGImage, fillRect); Thanks in advance! 回答1: The CoreGrapphics function CGImageCreateWithImageInRect correspond to the WithImageInRect method of CGImage . API signature is: public CGImage WithImageInRect (RectangleF rect) Once translated from ObjectiveC your source code should look like: CGImage

What is the equivalent of CGImageCreateWithImageInRect in MonoTouch?

霸气de小男生 提交于 2021-02-05 03:50:47
问题 What is the equivalent of CGImageCreateWithImageInRect iOS method in MonoTouch? I'm trying to convert this Objective-C line in C#: CGImageRef sampleImageRef = CGImageCreateWithImageInRect(self.CGImage, fillRect); Thanks in advance! 回答1: The CoreGrapphics function CGImageCreateWithImageInRect correspond to the WithImageInRect method of CGImage . API signature is: public CGImage WithImageInRect (RectangleF rect) Once translated from ObjectiveC your source code should look like: CGImage

Loading a font in skiasharp

余生长醉 提交于 2021-02-04 19:14:10
问题 How to use a custom font in skiasharp from Xamarin forms. I tried paint.Typeface = SKTypeface.FromFamilyName("CoText_Bd"); and paint.Typeface = SKTypeface.FromFile("CoText_Bd"); But both didn't worked out. Do i need to access the path of the font using dependency service ? 回答1: If you want trully multiplatform solution, put all SkiaSharp/PaintCode drawing Code into .NET standard library, including fonts as embedded resource (Don't forget to set Build action to Embedded resource!). Then you

Actionsheet with arrow using Xamarin

假如想象 提交于 2021-01-29 22:16:52
问题 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) 回答1: 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 来源: https://stackoverflow.com/questions/58945863/actionsheet-with-arrow-using-xamarin

sfsafariviewcontroller handling permissions requests

二次信任 提交于 2021-01-29 21:42:46
问题 I'm trying to access the camera and microphone for a webview displayed in a SFSafariViewController. I think I should respond to camera and microphone access requests made by the browser but I can't find a way to do it. On Android we have an override in WebChromeClient to do exactly that: public override void OnPermissionRequest(PermissionRequest request) { request.Grant(new String[] { PermissionRequest.ResourceAudioCapture, PermissionRequest.ResourceVideoCapture }); } Do I have any chance to

WebView in ios open as desktop mode

旧城冷巷雨未停 提交于 2021-01-29 14:26:54
问题 I use Xamarin WebView to open a site, site is using responsive design. On Android the site fills the page and work correctly Android Picture . My Problem in IOS it appears as it open in desktop not in mobile mode IOS Picture, after more searched i found WKWebView not use ScaleToFitPage Like UIWebView I try this code but not change anything WKWebView didn't equivalent for UIWebView's scalesPageToFit can anyone help me about that i stuck in that problem from week i didn't find solution till now

Actionsheet with arrow using Xamarin

随声附和 提交于 2021-01-29 14:08:23
问题 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) 回答1: 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 来源: https://stackoverflow.com/questions/58945863/actionsheet-with-arrow-using-xamarin

How to implement UICollectionView - XAMARIN.IOS

佐手、 提交于 2021-01-29 13:32:04
问题 I'm trying to use UICollectionView but I can't find any samples that I can take advantage of. I needed the UICollectionView by code (without using swift/storyboard/forms). Could you give me a really simple example? For example 2 lines with 2 columns please? Basic stuff just to try to understand how I can implement it. Thank you 回答1: You can refer to Collection Views in Xamarin.iOS doc to check how to use Collection View with Code .And here I will show a sample code to explain how to implement

Can't find an element on iOS in my xamarin ui tests

这一生的挚爱 提交于 2021-01-29 12:41:00
问题 I wrote some tests on android and now I'm trying to make it compatible to iOS too. I have some picker : enter image description here I gave the picker automation id and also to the label inside him so I can read it text, in android I succeed but in iOS I can't even see the label. tree repl in iOS : Ios repl tree tree repl in android: android repl tree the xaml code: <scrControls:ScrPickerWithBorder x:Name="SleepStartPicker" Grid.Row="1" Grid.Column="1" Margin="0" ArrowColor="{StaticResource

How to configure WkWebView in xamarin.forms iOS?

被刻印的时光 ゝ 提交于 2021-01-29 11:35:24
问题 Recently, I can't publish my new app to App Store due to the following error: ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview). Question 1, what is UIWebView and WkWebView? I can't even find a single word "UIWebView" in my project, how Apple knows I'm using it? The pages that I used are all xamarin based and Content Page