I want to make an view that looks like a wall in swift 3.
Here is an example:
Every entry should look like a square with some information.
Is there any framework which I can use or do someone know a solution for that?
I can't comment because of reputation issue. You can use UICollectionView if every entry has same width and height.Here is a tutorial https://www.raywenderlich.com/136159/uicollectionview-tutorial-getting-started.
If not, you can create subviews using UIView with your desired UI components.
I'm making app using with Xamarin.forms.
I had my own renderer linked with ContentPage.
And I added a solution someone made on my solution because I need his function.
Problem is that it has a renderer linked with ContentPage too.
So Only One renderer works now. (only one OnAppears fired)
Of course I could do hand merge those two function.
Is that how it's done?
Any better solution?
Thanks.
If you want to have both behaviours then you will probably need to merge them. There's no way of telling which one it will use when the same type is referenced by both. However it always picks the most specific element type. That's why when you need more control you're probably better off subclassing ContentPage and attaching your own renderer to the subclass instead. Your content pages would then inherit from the subclass instead of the default ContentPage. That way other renderers can't get in the way either.
When I added a couple of controls in my viewcontroller in storyboard and click
Resolve Auto Layout Issues -> Reset to Suggested Constraints.
The following popup appears and I cannot perform auto layout constraints.
Though, when I remove the Prototype Cell (which has a couple of labels and an imageview) from my tableview then auto layout works fine. Any thoughts?
Edited:
And manually adding constraints to individual elements work fine as well. After manually setting the image view inside prototype cell, the auto layout has started working fine without popping up that popup. So, maybe, sometime, it is hard for auto layout to figure out all these constraints itself.
Try clearing constraints before resetting them, this has worked for me before.
I had the same problem when using prototype cells in a UITableView and some other views in a UIViewController.
My solution was to select all the elements in the prototype cell and see if these had red or orange markers (constraint conflicts/problems). These elements I cleared the constraints for and afterwards I had no problem telling the entire view to "Reset to Suggested Constraints".
Obviously, Interface Builder has a problem resetting embedded table content constraints.
Actually . If you import different storyboard from another Xcode project. This is not possible to avoid problem. My personal advice is create a new UIViewcontroller or stroyboard. And step by step add items. But. I did not do this.
I lived three times. In fact When I saw this message. I was configuring tableview or UITableviewcell. At the end of the story I have fixed my problem. But There is no gold key for issue. I will explain as much as possible.
for All Views in View Controller select Clear Constraints
If you are using tableview or collection view. please delete.
I assume. there are label, button and scrollview on the project. Please add missing constraints. If you leave problem again. You need to delete any of them.
for All Views in View Controller Reset to Suggested constraints.
If you don't leave problem again. PERFECT. If there is a reverse situation
for All Views in Second View Controller select Clear Constraints
delete any of item. Select add missing constraints again.
Continue to try the third and fourth steps. Until you find the faulty objects.
I'll try to help you if you submit your project.
Good luck .
Following Solution work for me.
Actually initially i used Free-from storyboard of size 600 into 900 that time i was getting this error. so i deleted that storyboard and again drag and drop element and make connections, then i solved issue.
I have faced same problem with Xcode 6. In my MainViewController I have a tableview with custom TableviewCell. In Interface builder itself I have taken taken 2 labels on tableview cell.
When I try to add constraints it gives me error. I did remove prototype cell in tableview and worked with nib with customCell. Be careful while working with custom tableViewCell.
Let me know if you need any additional information.
I had same issue last evening, After many try and error i found that it was just a corrupt ViewController. I created a new ViewController2 with the same aspects, then applied constraints to the ViewController2, and it worked! Still not sure why exactly the other one had issues.
I had some problem with Xcode 7. I solved it very simple. I cleared constraints -
Reset to Suggested Constrains
, then applied -
Add Missing Constrains.
This has worked for me.
I've been working through the Stanford CS193p course for iOS 5.0 development (available on iTunes U) and have run into a problem whilst attempting Assignment 3 (pdf).
I am trying to implement a graphing calculator on top of a previous calculator model I have developed. In my storyboard I have added a "graph" button to my calculator which segues to a new view controller. Inside this is a view called 'GraphView'. I need to delegate the data source for this view. I can set it inside my GraphViewController like so:
self.graphView.dataSource = self;
I can also set that in Interface Builder. What I would like to do is set it to my CalculatorViewController, which first sent the segue message, but there is no mention of GraphViewController or GraphView in it's code, so I'm not sure how to accomplish this. Interface Builder would not let me drag the data source out of it's own view's frame either.
Short version: I want to delegate my data source from my Graph View to my CalculatorViewController. See the storyboard here: Storyboard.
Any help would be very greatly appreciated.
You can do this in the prepareForSegue function. You can find a similar example to how this is done in PsychologistViewController.m.
I looked for this on the web, but I could not find any clear tutorial on how to successfully implement an NSCollectionView. How should I proceed?
In Interface Builder, I can drag an NSCollectionView to the main view, and I see that there are two other new views in the documents window: I suppose one is the actual NSView inside the collectionView, and the other one is the NSView prototype for each of the elements that will be displayed inside the collection.
But from now on I don't have any idea about what to do.
Any help would be very appreciated, but thank you anyway in advance.
—Albé
Xcode > Help > Developer Documentation...
The Collection View Programming Guide contains a step-by-step tutorial. (In fact, that's all it contains at present.). The sample app IconCollection is all set up with reasonable bindings and code to show how the collection view works.