How to create a arrow above the table view - iphone

I need to design a view that look like some thing like this. I know this a UITableView below the top bar. but how i can create a arrow like shown in attach image.
Any guide will be helpful
Thanks

It's not about "Creating Arrow" above UITableView, it's about "Showing White Triangle" in the Image. Also , Changing the Image of UIButton is more Simpler.
Change this Image
with

It seems to be header view of table.
Use this methode
-(UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 320, 40)];
//create your view here. buttons lable image etc.
return view;
}

There can be different ways to implement this but a much easier way is to use this library SDSegmentedControl
Hope this helps.

You can create custom header view instead of giving the background view to all the table . add the background image to the header view with array pointing in the opposite direction .

just use an arrow image in uiimageview, as it is only above the uitableview.
If the arrow will move to other label for ex, series or title, then just change the frame of that arrow imageview(u can also use uiviewanimations). This is what I had done when I had the same issue.

If you're going to be changing the rest of the view depending on what button the arrow is on, you also might want to look into putting your UITableViewController inside of a UITabBarController. You won't be able to get the same colorscheme as you have in your screenshot I don't believe, but a lot of the behind-the-scenes work for changing the rest of the view depending on what is selected will be done for you (or will at least be much easier to set up). Also, Apple seems to tend to grumble about "non-standard interfaces" when you try to make up your own way of doing something that already can be done with the built-in UI framework.

Related

How to remove separation between UITableView cells

I want to remove the built in separation between cells in UITableView.
I tried using :
[self.myTableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
But that only removes the separator line.
I need the view to appear as if it's not a table view at all. (like the tableview is one big view who doesn't contain many separated cells)
Is that possible ?
Edit:
See the separation between the cells? I wan't it to disappear and the table view to be as if it's one big cell.
Edit 2:
The problem doesn't appear when I don't use an image view as the cell background, but just use a simple background color.
I tried using a different image, and as you can see the problem is much less obvious.
I would still appreciate a solution for the red image though, since I do have a lot of images that still can't be put as background currently. (Not sure why one image would cause the problem and other won't ,I guess something with the pic setting)
You can do something like
self.tableView.separatorColor = [UIColor whiteColor];
or
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
I suppose in your case it would be
self.myTableView.separatorColor = [UIColor whiteColor];
In the future you might want to search Stack Overflow as there are many similar questions.
Your separation is due to the background gradient in the red example and it is not coming from the tableView. in your second image there is no gradient so you don't see separation.
remove the gradient from the background image and it will be fine.
try to do this:
self.tableView.backgroundColor=[UIColor clearColor];
self.tableview.separatorColor=[UIColor clearColor];
self.view.backgroundColor=[UIColor yourcolor];
i don't remember if it's then color with image or backgroundwithimage or background with view.. don't remember, however logic way is this.
hope it's usefull
If you just want to get rid of the separator between UITableView cells. Two things you need.
[self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
Make sure your imageView ( in your tableview cell) has same height as tableview cell. This means your image view is fully covering the table view cell. Goto inspector view and verify the height , if you see the height is 43 just set it to 44 ( 44 is default tableview cell height for retina display).
Go StroyBaord -> Select Table -> Attribute inspector -> Separator None
No Separator Will Appear
You seem to have answered your own question. If you want a solid colored background, make an image with just a solid color. I suspect it's not best practice, but it will get the job done.
I've done this many times in my own applications. I understand that you wish to make your tableview look as if its not a tableview but as if its on a blank piece of paper.
Just a note for you, the reason you can see the separation with some images and not so much with others is due to its image texture. When you place copies of the image side by side, they dont have a continuous pattern thus forming obvious visual separations.
Solution:
Assuming you have the tableview setup in a xib file, display the background of the table itself to to clear -> then set the background of the view itself to whatever image you like. You will then have a tableview with the background view being transparent with only the main view behind it showing its image or color. Displaying your image on this canvas will mean a clear one image background.

Mimic ABNewPersonViewController UI

I'd like to replicate the iOS 4.x ABNewPersonViewController UI layout (see link text) in a custom view but I'm unsure about the best way to achieve this. I was thinking of a single grouped UITableView, but what about the first section? How do I achieve the smaller cells (first,last,company)? And finally the "add photo canvas" is it just a sub UIView with a background image for the shadow and the rounded border or can this be done programmatically?
Many thanks in advance!
your idea about a single grouped UITableView could work. The way to get the smaller cells as well as the photo cell would be to subclass UITableViewCell and create it like that. and yes the photo canvus is just a custom UIView added on top of the UITableView. I'm not sure i see the point of rolling your own here, but thats how i'd start. Also i think i recall seeing a tutorial on how to build this page..try googling for it.

how to set UIView Background color with glass effect similar to UIAlertView

i need to place one textfield with 3 buttons in an alertview. According to UIGuidelines it is not possible,so Instead of AlertView I place UIView similar to Alertview.
And i animate it like Alert view using this code.
If works fine.
it displays with white Color Background,But i need to design same as AlertView Background color and style like round edged.
How can i done this.
can anyone pls help me.
Thank u in advance.
The UIAlertView background is simply an image. You are better off creating a custom png image and using it as your background.
That can be done with CoreGraphics / Quartz functions, but it is quite complicate to simulate the same effect
Another approach would be to create a UIImageView with a streched uiimage you mock in Photoshop or so.
;)
EDIT: You can set a custom view directly into UIAlertView like this:
if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) {
[_addPersonAlert setValue:auxContainerView forKey:#"accessoryView"];
}else{
[_addPersonAlert addSubview:auxContainerView];
}
There are a lot of open source, subclasses of UIAlertView that might accomplish what you want to do. I'll leave a couple as an example but you can certainly google out some other options as well.
https://github.com/rtecson/RTAlertView
https://github.com/lmcd/LMAlertView
In my case I used once, LMAlertView which let's you access it's "contentView" property, to set any UIView that you want as part of the alert. Have in mind that you can add a hierarchy of views into a single UIView and set this container view as the contentView of the alert.

iPhone UIImage overlapping text

I have a view with a UIScrollView, UIImageView for a background, and a UITextView. I have created several other views just like this and they all come out okay - with a background image and scrollable text but for some reason, now I can't make that work. Either my image overlaps all of the text so that I can't read it or the UITextView default background (white) shows up so that the user can't see the background image. What could be causing this problem?
Do you use Interface Builder or build the views hierarchy in code?
In both cases you should make sure that the order of your views is correct.
In IB the view that you want to appear on top of all the rest has to be under the rest of the views.
In code, make sure that the text view is the last to be added to the hierarchy.
You could also use the next code in order to check if this is the problem:
[self.view bringSubviewToFront:textView];
Okay, it must have had something to do with choosing the delegate. I can't say that I completely understand how I fixed it but it had to do with declaring the delegate in IB.

Floating a UILabel above OpenFlow

How do you get a UILabel to float above Alex Fajkowski's implementation of CoverFlow called OpenFlow?
Ok I've figured it out. I just had to use bringSubviewToFront with the UILabel.
Thanks to everybody who answered.
Make an OpenFlow instance and a UILabel instance subviews of a parent view, placing the label atop with flow view using -insertSubview:atIndex:, -addSubview: or similar e.g.:
[self.view addSubview:myOpenFlow];
[self.view addSubview:myLabel];
To answer the second question, try this: edit the AFOpenFlowView in IB and add the label view as a subview of that wherever you want it to appear, then set the attributes on the view to Hidden if you don't want it to appear by default. Create an IBOutlet for the label view in your controller so you can easily manipulate it, such as setting hidden to show in order to show it. I'm not familiar with open flow so I'm not sure if it will programmatically create a subview that will obscure your label. If so you may need to use the outlet to move it to the front using UIView methods.
The Openflow example code shows a perfect demonstration of this. Alex adds an info button in the top right of the openflow view using interface builder. This is exactly what you are asking for.
I would add that if you can't understand what is going on from the example code, you should look at more code examples from Apple demonstrating simple UIView usage.
It's not so easy because the label name has to change for each picture. We have to work with index, and with event.. move.. tap.. selected...I'm working on too !