Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
The tableview isn't stretching all the way vertically in iPhone 6 or iPhone 6 Plus.
Any ideas why this is happening? Thanks!
Storyboard:
UPDATE:
This question was actually really helpful in another thing to check for as to why the tableview was getting cut off: Why is my UITableView cut off in iOS 7?
There's a whole bunch of things you want to check for if your Table View Cell are getting cut off:
- are they pinned to superview or content view?
- are the constraints such that you are cutting off content without knowing it?
- is a navigation bar or tab bar cutting off content?
- check the auto resizing mask or add one if need be settingsTable.autoresizingMask &= ~UIViewAutoresizingFlexibleBottomMargin;
And multiple other reasons. Its tricky, so if you come across this Q+A and need help, just drop a note and will help!
Select your tableView and pres Pin (a litte square icon with lines on the sides down in Xcode). Then add the bottom constraint (click here, it will turn red) and set value 0. Enjoy
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have quite a daunting challenge. I want to make this:
So:
I use a table (plain not grouped cells).
Cells must have rounded corners & shadow.
I would prefer to use CGRect to draw the cells instead of using images (for speed & space economy).
The cells in their most basic form look like Cell 1, but some have extra checkboxes like Cell 2.
Tutorials that say to use images as background for rounded cells never touch on the point about sliding the cell to reveal actions. I think that by using an image the entire frame of the cell will slide and look really awkward. How can that be overcome?
Is it possible to mix cells? Regarding adding checkboxes I though of 2 ways. Either extend the entire cell downwards and add the checkboxes & text OR just add a 2nd cell type specifically made for checkboxes (I prefer this option but I don't know if it's possible to mix cell types).
NOTE: The cell is the ENTIRE rounded rectangle, not just the upper part (The upper part is the title). They grey line is only for style and will be just an image.
I won't ask about a specific way of doing this. Each has it's own way of doing things. If you know how to do one of the things above (except creating a table view :) ), please help me (but keep in mind that it must be compatible with the rest)!
Note 2: Swift is preferred but Obj-C is fine too (unless code can't be ported to Swift).
Thanks!
i would create custom table view cells for your table view by subclassing UITableViewCell, assigning it to your table view, and from there you would be able to customize the cell with a UIView and customize the .layer.cornerRadius including all the shadow properties on .layer
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
How I can move and resize a rectangle inside the Canvas horizontally in windows 8. I am trying to create a scale like control in my application. It will work like I can resize the rectangle horizontally and also it is possible to move the rectangle inside the canvas. Based on the rectangle position I will calculate the scale value. But when I try for the same I get stuck with resizing the rectangle(Drag on the left and right side of the rectangle to expand). Please anyone guide me to develop the same. No need to take effort for creating a sample for me. Just guide me, I will do the rest.
It sounds to me like you are trying to allow for two different operations with the same gesture (single point of contact that moves on the surface). The behavior sounds to me like you want the rectangle to resize horizontally when you drag on the far left of right of it and to move around on the canvas when you drag anywhere else on it (please correct me if this is wrong).
I would think that you would want to use the Scale gesture for the resizing and a Translate gesture for the movement. In the past I have used UIElement.ManipulationMode with handlers for the appropriate manipulation events (e.g. ManipulationStarted, ManipulationCompleted, etc). I have also seen some mention of using GestureRecognizer but haven't used it directly myself.
Once you have each action (drag or resize) managed by a distinct gesture you should just be able to update the size of the Rectangle by either directly changing its height and width values or by using a ScaleTransform.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Suppose that I have an object named Topic. And inside that topic I can create Messages. The most recent messages needs to be the first message on the list (This is already done). My problem is that I need to show the messages in a view that can be scrolled either right or left (Right to show the older messages, and left to go back to the newer messages). Imagine an image collection that can be scrolled sideways in a ScrollView, that how this should look like. Since the messages is being add by the user, I can't use UIImage.
Any opinions how I should deal with this? or do you know any tutorial links that can help me? Thanks.
I have found Apple's Street Scroller demo application a good source of inspiration for doing something similar to what you propose. Although the demo seems to stress the "infinite scrolling" aspect, it also demonstrates how one can achieve a smoothly scrolling view that is populated with small detail views - in your case those small detail views would be used to show details about a message.
<self-advertisement>The demo is fairly basic, it is far away from some piece of library code that can be just dropped into an app and will work out-of-the-box. In my own app I have made an attempt at generalizing the concept and writing a reusable class that provides seamless (i.e. not paginated) scrolling through a finite number of item views. In case you are interested, have a look at the ItemScrollView class in this GitHub repo. As always, YMMV.</self-advertisement>
Maybe you can use this scrollview just create a cell containing a label which will hold the message and pass the array of message just like you use an array for populating tableview cell. This scrollview will also take care of reusing your views. :)
so no need to worry about memory.
Just implement below datasource methods
-(VSScrollViewCell *)vsscrollView:(VSScrollView *)scrollView viewAtPosition:(int)position;
// implement this to tell VSScrollview the view at position "position" . This view is VSScrollviewCell or subclass of VSScrollviewCell.
-(NSUInteger)numberOfViewInvsscrollview:(VSScrollView *)scrollview;
// implement this to tell VSScrollview about number of views you want in VSSCrollview.
by default, height and width of cell will be bounds of scrollview and spacing between cell will be 0, which you can customize using other datasource methods listed in readme.
This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
UIView Animation Inconsistent Result
I have an iPhone app where I've set a lot of the UI elements of one of the view controllers up in Interface Builder so that when the view loads, those elements animate out to to where I want them. However, on one of the buttons, I have a tap gesture which dims the screens by bringing a black UIView to the front with its alpha property set to .5.
Whenever the background dimmer comes to the front, all the UI Elements that I've animated to different places jump back to where they originally were placed.
I wish I could post code but I can't since it's a business venture.
Anyone think they have an idea?
Edit: An obvious fix is once I bring up the background dimmer, just reanimate everything else back to where it should be. But that's a messy solution and I would rather just have them stay where they were animated to.
Also, I animated them by setting the frame using CGRectMake and such if that helps.
EDIT 2:
The jump is being caused by calling:
[self.view bringSubviewToFront:view];
I don't know how to stop that from happening though.
Have to give credit to #rob mayoff. It has to do with using autolayouts in storyboards as talked about in this question: Autolayouts
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I have an image fo this kind:
1000x1000 but only a portion of the image is opaque, think a filled circle on the left, other picels are transparent.
I want to copy/paste only a portion of the image with an area choosed by me:
I drag and drop the mouse so that part will be 400x100 but when i paste i have an image 300x76.
photoshop has trimmed my image, but i want it with the border of the image choosed by me, i want that coordinates.
preparing an image 400x100 blank and copying that image doesn't solve my problem because i must pan the image on the original position.
how can i copy/paste the image without trimming?
thanks
Your problem is because you're asking Photoshop to take into account an area that doesn't exist (it's transparent). You cannot "Copy" an area where nothing exists in Photoshop. Your only option is to place something (a colour) in the corners where the transparency exists, select your area, Copy Merged (using CTRL + SHIFT + C) and then delete the extra colour once you've pasted it.
There's no other way around it.
it depends by which method you are doing copy paste.
i suggest you to use marquee tool.
select marquee tool
drag it to your desired area,now copy and than paste it.,if its not copying the thing press cntrl+shift+c because most of the time,Photoshop memory don't behave dynamically.