{"action":"created","issue":{"url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/626","repository_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile","labels_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/626/labels{/name}","comments_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/626/comments","events_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/626/events","html_url":"https://github.com/Redth/ZXing.Net.Mobile/issues/626","id":261521988,"number":626,"title":"ZXingBarcodeImageView not rendering on iOS","user":{"login":"girishv6991","id":32084996,"avatar_url":"https://avatars0.githubusercontent.com/u/32084996?v=4","gravatar_id":"","url":"https://api.github.com/users/girishv6991","html_url":"https://github.com/girishv6991","followers_url":"https://api.github.com/users/girishv6991/followers","following_url":"https://api.github.com/users/girishv6991/following{/other_user}","gists_url":"https://api.github.com/users/girishv6991/gists{/gist_id}","starred_url":"https://api.github.com/users/girishv6991/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girishv6991/subscriptions","organizations_url":"https://api.github.com/users/girishv6991/orgs","repos_url":"https://api.github.com/users/girishv6991/repos","events_url":"https://api.github.com/users/girishv6991/events{/privacy}","received_events_url":"https://api.github.com/users/girishv6991/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-09-29T03:27:47Z","updated_at":"2018-03-02T08:57:50Z","closed_at":null,"author_association":"NONE","body":"The following code works fine for Android and UWP. `ZXingBarcodeImageView` is not rendering on iOS. \r\n\r\nI have initialized in the `AppDelegate.cs` as shown below\r\n\r\n```\r\nglobal::Xamarin.Forms.Forms.Init();\r\nZXing.Net.Mobile.Forms.iOS.Platform.Init();\r\nLoadApplication(new App());\r\nreturn base.FinishedLaunching(app, options);\r\n```\r\n\r\nHere is the `ContentView` for displaying the QRCode.\r\n```\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ContentView xmlns=\"http://xamarin.com/schemas/2014/forms\" \r\n             xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\"\r\n             x:Class=\"AZCommute.QRResult\">\r\n    <ContentView.Content>\r\n    </ContentView.Content>\r\n</ContentView>\r\n```\r\nHere is the `MainPage.xaml`\r\n```\r\n<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n<ContentPage xmlns=\"http://xamarin.com/schemas/2014/forms\"\r\n             xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\"\r\n             xmlns:local=\"clr-namespace:AZCommute\"\r\n             x:Class=\"AZCommute.MainPage\">\r\n    <StackLayout HorizontalOptions=\"Center\" VerticalOptions=\"Center\">\r\n        <Label Text=\"QR Code Generator\" HorizontalOptions=\"Center\"/>\r\n        <local:QRResult x:Name=\"qrResult\"/>\r\n    </StackLayout>\r\n</ContentPage>\r\n```\r\n\r\nHere is my code for generating the QR Code\r\n\r\n```\r\nbarcode = new ZXingBarcodeImageView\r\n{\r\n    \tHorizontalOptions = LayoutOptions.FillAndExpand,\r\n \tVerticalOptions = LayoutOptions.FillAndExpand,\r\n};\r\nbarcode.BarcodeFormat = ZXing.BarcodeFormat.QR_CODE;\r\nbarcode.BarcodeOptions.Width = 500;\r\nbarcode.BarcodeOptions.Height = 500;\r\nbarcode.BarcodeOptions.Margin = 10;\r\nbarcode.BarcodeValue = \"ZXing.Net.Mobile\";\r\n\r\nqrResult.Content = barcode;\r\n```\r\n\r\n**Edit**\r\nAfter adding \r\n```\r\nWidthRequest = 410,\r\nHeightRequest = 410,\r\n```\r\nto `ZXingBarcodeImageView` initialization, the qrcode is rendered, but, aspect ratio is lost."},"comment":{"url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/comments/369861218","html_url":"https://github.com/Redth/ZXing.Net.Mobile/issues/626#issuecomment-369861218","issue_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/626","id":369861218,"user":{"login":"knocte","id":331303,"avatar_url":"https://avatars2.githubusercontent.com/u/331303?v=4","gravatar_id":"","url":"https://api.github.com/users/knocte","html_url":"https://github.com/knocte","followers_url":"https://api.github.com/users/knocte/followers","following_url":"https://api.github.com/users/knocte/following{/other_user}","gists_url":"https://api.github.com/users/knocte/gists{/gist_id}","starred_url":"https://api.github.com/users/knocte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knocte/subscriptions","organizations_url":"https://api.github.com/users/knocte/orgs","repos_url":"https://api.github.com/users/knocte/repos","events_url":"https://api.github.com/users/knocte/events{/privacy}","received_events_url":"https://api.github.com/users/knocte/received_events","type":"User","site_admin":false},"created_at":"2018-03-02T08:57:50Z","updated_at":"2018-03-02T08:57:50Z","author_association":"NONE","body":"I have the opposite problem, it shows in iOS but not Android."}}
{"actor":{"display_login":"knocte"}}