Bug 21076 - Xamarin iOS Designer on visual studio don't allow resize views/ don't detect image resolution convention / forget image
Summary: Xamarin iOS Designer on visual studio don't allow resize views/ don't detect ...
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS Designer ()
Version: 3.1
Hardware: PC Windows
: High normal
Target Milestone: 3.7
Assignee: Alan McGovern
URL:
Depends on:
Blocks:
 
Reported: 2014-07-03 04:07 UTC by Gutemberg
Modified: 2014-10-01 07:18 UTC (History)
11 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Gutemberg 2014-07-03 04:07:48 UTC
-- Resize view bug -- 

Steps:

- Just created a brand new project on Xamarin.iOS with Visual Studio 2013. 
- Selected iOS Universal with Storyboard (Single View Application template).
- Added a View Controller.
- Added another View(no matter which one. pick a simple View or a ImageView to put on ViewController) 
- Try to resize the view on Visual Studio 2013 and it will not resize. The minimal Height is 88
- The dot guides are always misplaced

Expected result:

- Resize the control

What happened:

- This doesn't happen on Xamarin Studio iOS Designer on Mac. 

- You can see a video recorded on the link bellow showing the problem steps to be reproduced and yes, I'm on latest version of everything on Xamarin.

- http://1drv.ms/1vzKfNe

-- Image convention bug --

Steps:

- Add images to resources folder following Apple's convention for resolution/platform (@2x, ~iphone, etc) in the file name

Expected result:

- Get only one image option(displaying only filename.png for example instead of the full name with the platform suffix) when set Image property for a ImageView and let iOS at runtime select the right image for the device

What happened:

- You still see the 3 filenames(or more) one for each resolution/platform unlike what really happens if you use Xbox Interface Builder

-- Missing images -- 

Steps: 

- Open any story board that came from Mac, or from older versions of Xamarin, or even from XCode itself that contains ImageView with some image set on Image property.

Expected result: 

- Open Storyboard without any issue

What is happening:

- It shows the ViewController right but all the ImageView views are showing the default image on it(like if no image is set on Image property when you just drop a new ImageView view on storyboard
- The property is already set and pointing to the right file (which exist on disk)


So, all those bugs render useless the iOS designer since you can't:

1. Resize/reposition the images on storyboard surface
2. Use the nice image handling feature for multi screen sizes that iOS provides
3. Forget/Miss the images already ser on ImageView


And just for the sake of suggestion, would e good if the constraints can be set as it is in Xcode Interface Builder. Even with the documentation provided on Xamarin site, it becomes a lot confuse how to use the constraints on Xamarin iOS Designer.

Hope it gets fixed soon, 'cause it is a stop for our projects and we can't get back to work on Mac anymore.

Thanks! Best regards...

Gutemberg
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2014-07-03 12:15:13 UTC
Thanks for the reports!

Eventually this bug will need to be broken up across multiple reports, one per issue.

It looks like the first bug "Resize view bug" is a duplicate of:
https://bugzilla.xamarin.com/show_bug.cgi?id=20885

So no need to make a separate report for that one. There might be duplicates for the other bugs too. I'll come back and look through these a bit more carefully over the weekend if nobody gets to them first.
Comment 2 Jon Goldberger [MSFT] 2014-07-03 17:55:16 UTC
The missing images _might_ be due to this bug: xhttps://bugzilla.xamarin.com/show_bug.cgi?id=20159

The issue being due to paths not being converted correctly for the platform, in other words if the path to the file is set to be Images\image.png, in VS the image will show in iOS Designer but not in the app, if set to Images/image.png then the reverse is true, the image will show in the app but not in the designer.
Comment 3 Gutemberg 2014-07-03 18:06:11 UTC
Hi Jon,

No, the problem is not the path. I'm adding _all_ my images inside the Resources folder without subfolder. Just on it's root Resources directory.
Comment 5 Alan McGovern 2014-07-08 09:10:31 UTC
1) I'm just testing a potential fix for the 88 pixel issue. From my investigation, it looks like this bug would only affect UIViewControllers which were part of a UINavigationController or UITabBarController and only when using 'long resolution iphone' mode. i.e. if you change the simulated metrics to be the shorter iPhone, then the issue would not happen.

If you could confirm that normal UIViewControllers (not part of a UINavigationController etc) work correctly, then I'm pretty sure that this fix will work for you.

2) We're looking into the snap lines not aligning correctly. We have not yet been able to reproduce the issue. Do you have a high resolution/high DPI display? Or do you use any form of text/screen scaling? If so, can you give us the details. We suspect that this issue is related to high DPI or scaling, but we're not sure which.

3) We detect foo.png and foo@2x.png as being the same thing. We will improve this logic to also take into account other forms like foo~iphone.png, but this should not be a breaking issue.

4) 'Missing images'
Can you attach a copy of a solution which demonstrates this issue? This is a new one which we are unaware of.
Comment 6 Gutemberg 2014-07-08 15:15:36 UTC
1) It happens on any UIViewController for me. The sample project can show you that and no matter if it is shorter or bigger iPhone.
2) I'm using my Microsoft Surface Pro 2. It has a FullHD resolution display and even on my external monitor, that is also FUllHD, it has the same problem.
3) Well, it's pretty breaking issue. If I select one image like foo@2x.png and than go commit the code on my repository so other developers that uses Mac with Xcode interface builder, and then they try to open Storyboard designer, it will breaking as a missing image.
4) There are other bugs here for this same issue. 

The solution I've attached has everything needed to simulate the problems.

Thanks
Comment 7 Alan McGovern 2014-09-10 08:31:23 UTC
Hi,

The bug where you couldn't resize some widgets smaller than 88 pixels should now be fixed. It was more complicated than originally anticipated. Sorry about the delay! The next series of releases for Windows and Mac should have the fix for this. You will need Xamarin.iOS 8.x or higher as well as the latest Xamarin for Visual Studio(v3.6 or higher) or Xamarin Studio on Mac (the latest release of 5.4).

We will investigate the remaining issues and hopefully get them resolved in the next day or two.
Comment 8 Alan McGovern 2014-09-10 10:42:30 UTC
I believe all the bugs in this have now been fixed. As such i am closing this bug. The fixes should all be part of Xamarin Studio 5.5, Xamarin 3.7 and MonoTouch 8.0.
Comment 9 Mohit Kheterpal 2014-10-01 07:18:17 UTC
I have checked this issue and now we are able to resize widgets height less than 88 as shown in screencast : http://screencast.com/t/Y9nCoqKCPl

@Gutemberg Please check these issues when you will get these builds and file separate issue if you face any issue in future.

As of now I am closing this issue.

Thanks

Environment info :
Microsoft Visual Studio Professional 2013
Version 12.0.21005.1 REL
Microsoft .NET Framework
Version 4.5.52742

Xamarin   3.7.188.0 (830a1477f07719a370cd6f5e905124c0cb2a57c6)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.18.0.32 (04399d62cfc00624d575239d1762ea4fd6d012e2)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.2.0.0 (a1f0a7a951a158ce3b9445e387ea737a083ffd79)
Visual Studio extension to enable development for Xamarin.iOS.