Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
iOS UI Component for displaying bubble similar to the Mail app wenn selecting contacts
branch: master

This branch is 4 commits behind beat843796:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
HEBubbleView.xcodeproj
HEBubbleView
.DS_Store
.gitignore
README.md

README.md

HEBubbleView

Easy to use iOS UI Class for providing a bubble list similar to the contact bubbles in the iOS and OSX Mail App. Supports editing, deletion, insert, inseratAtIndex, Custom UIMenuControllerItems for a given index and animation support. Working with iPad and iPhone. Currently it is non-ARC.

Usage

  • Refer to the Sample Project.
  • Drag and Drop HEBubbleViewItem and HEBubbleView files to your XCode Project
  • Create a UIViewController subclass and implement the HEBubbleViewDatasource and HEBubbleViewDelegate protocol
  • Usage is very similar to UITableViewController/DataSource/Delegate

DataSource

-(NSInteger)numberOfItemsInBubbleView:(HEBubbleView *)bubbleView;
-(HEBubbleViewItem *)bubbleView:(HEBubbleView *)bubbleView bubbleItemForIndex:(NSInteger)index;

Delegate

-(void)bubbleView:(HEBubbleView *)bubbleView didSelectBubbleItemAtIndex:(NSInteger)index;
-(BOOL)bubbleView:(HEBubbleView *)bubbleView shouldShowMenuForBubbleItemAtIndex:(NSInteger)index;
-(NSArray *)bubbleView:(HEBubbleView *)bubbleView menuItemsForBubbleItemAtIndex:(NSInteger)index;
-(void)bubbleView:(HEBubbleView *)bubbleView didHideMenuForBubbleItemAtIndex:(NSInteger)index;

Create and configure the BubbleView in your ViewController

    bubbleView = [[HEBubbleView alloc] initWithFrame:self.view.frame];

    self.view.backgroundColor = [UIColor underPageBackgroundColor];

    // configure bubble view
    bubbleView.alwaysBounceVertical = YES;
    bubbleView.bubbleDataSource = self;
    bubbleView.bubbleDelegate = self;
    bubbleView.selectionStyle = HEBubbleViewSelectionStyleDefault

    [self.view addSubview:bubbleView];
    [bubbleView release];
  • You must override canBecomeFirstResponder and return YES in your HEBubbleViewDelegate, otherwise MenuController callout is not shown
-(BOOL)canBecomeFirstResponder
{
    return YES;
}

License

Copyright 2012 Clemens Hammerl / Adam Eri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Attribution is appreciated.

Something went wrong with that request. Please try again.