logo
down
shadow

UITableView section index overlaps search bar


UITableView section index overlaps search bar

Content Index :


Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

UITableView section index not able to scroll to search bar index


Tag : ios , By : user183676
Date : March 29 2020, 07:55 AM
may help you . To solve this we adjusted the content offset to account for the UITableView's content inset introduced in iOS 7: CGPointMake(0.0, -tableView.contentInset.top)
- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index {

    NSInteger resultIndex = [self getSectionForSectionIndex:index];

    // if magnifying glass
    if (resultIndex == NSNotFound) {
        [tableView setContentOffset:CGPointMake(0.0, -tableView.contentInset.top)];
        return NSNotFound;
    }
    else {
        return resultIndex;
    }
}

iOS: Section overlaps UITableView record


Tag : ios , By : Sandip
Date : March 29 2020, 07:55 AM
To fix the issue you can do I am trying to display three sections (@"Accounts and Tasks", @"Life Events", @"More") and relevant content in an UITableView. I am creating a custom UILabel for each row and try to display text.
- (UITableViewCell *)tableView:(UITableView *)tableView
         cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    ....
     UILabel *label;
    if(cell == nil) {
        label = [[UILabel alloc] initWithFrame:CGRectMake(26, 4, 250, 30)];

        label.tag = 8888;
        label.backgroundColor = [UIColor clearColor];
        [cell.contentView addSubview:label];
    }
    label = (UILabel *)[cell.contentView viewWithTag:8888];
    label.text = [listData objectAtIndex:[indexPath row]];
}

Tag : ios , By : Martin
Date : March 29 2020, 07:55 AM
will help you Finally came up with an acceptable solution to this question. This answer builds off of my question above (I'm using all the same code minus what is changed here). The main thing to note here is that @andrewbuilder was right - adding the search bar as a table header view will guarantee that the search bar will move on scroll; it's just acting like any other table header view.
What I ended up doing was a combination of things. The main change I made in my approach was changing the way my main controller presents my search controller. Specifically, I went from self.definesPresentationContext = YES; to self.definesPresentationContext = NO;
self.searchBar = self.searchController.searchBar;
[self.view addSubview:self.searchBar];

UITableView, Search Bar and section index


Tag : ios , By : Manu
Date : March 29 2020, 07:55 AM
this will help I don't know if this is the easiest way to achieve this, but it works.
The first thing would be to not add the search bar as a header view, but rather to have it and a table view added to a separate scroll view. Something like this (margins for ilustratory purposes only) : light blue is the underlying scroll view
class InnerScrollView: UIScrollView {
    func gestureRecognizer(gestureRecognizer: UIGestureRecognizer,
        shouldRecognizeSimultaneouslyWithGestureRecognizer otherGestureRecognizer: UIGestureRecognizer) -> Bool {
            return true
    }
}
override func viewDidLayoutSubviews() {
    super.viewDidLayoutSubviews()

    let initalContentOffset = CGPoint(x: 0, y:self.tableView.frame.origin.y)
    self.underlyingScrollView.contentOffset = initalContentOffset

}

Tag : objective-c , By : user165871
Date : March 29 2020, 07:55 AM
Related Posts Related QUESTIONS :
  • how to display CFStringType? Like kABHomeLabel
  • how can i load a display in tableview header section iphone?
  • iPhone native app + integrate payment / purchase to buy products
  • How can I do metering/average peak power level in OpenAL?
  • IPhone and Android website design
  • Xcode Project Code Changes Not Updating 100% After Save-Build-Run
  • NSString drawAtPoint Crash on the iPhone (NSString drawAtPoint)
  • Save UIwebview contents to photo gallery
  • Change width of UIImageView
  • iPhone: Group by month - Core Data
  • NSUndoManager grouping problem?
  • iPhone: Override UIButton buttonWithType to return subclass
  • Iphone sdk, Rounded UIImageView FRAME corners, not just masking it
  • iPad application crash in Apple review - cannot replicate in simulator, have crash log
  • Setting tick marks for UISlider
  • Can we add UILabel to splash screen in iphone?
  • iPad custom Keyboard GUI
  • striking through the text
  • Push Notification in Iphone application
  • How to turn off the bounce in UIWebView
  • Updated iphone application not live yet
  • Exposing python api over the network for an iphone application
  • Create a table of contents from a pdf file
  • Blurred PNGs on UIView, using Interface Builder
  • UIWebView NSURLRequestReloadIgnoringLocalCacheData doesn't actually ignore the cache
  • uitableview reloadData issue
  • UIView animation along a round path?
  • UITabBarController detect tab clicks
  • iPhone objective-c autoreleasing leaking
  • EXC_BAD_ACCESS with NSAutoReleasePool
  • How to write text on graph x and y-axis intervals points?
  • Mobile Application design: Menu Driven vs Tab Control
  • Confused about UIView frame property
  • Integrating FB connect with Foursquare into an IPhone App
  • How to get a volume measurement of iPhone recording in dB, with a limit of at least 120dB
  • Getting frequency of sound on iPhone
  • What are the Build Settings for a Universal iPhone and iPad Application
  • How to add lowercase field to NSURLRequest header field?
  • Convert NSMutableArray to string and back
  • MFMailComposeViewController programmatically call the "Send" button
  • How do I use the gravity vector to correctly transform scene for augmented reality?
  • Changing X & Y of Button upon Rotation
  • How to demo an iPhone app on a projector
  • vnc application for iPhone. How to go about building one?
  • Changing only the size of a UIFont on a UIButton
  • How do I show the user's location, and additional points on an iPhone map?
  • iPhone progressive download audio player
  • How to work with images(png's) of size 2-4Mb
  • i want to call a phone number from the simulator
  • Core Data Inferred Migration – Automatic "lightweight" vs Manual
  • Force a WebView link to launch Safari?
  • Generating an LPCM buffer in memory for AVAudioPlayer initWithData
  • How to change size of UIButton
  • Iphone page curl effect
  • Is it possible to auto-rotate a modal view but not its parent?
  • Is there an easy way to drag and drop a UITableViewCell between two UITableViews?
  • How to clear UIWebView cache?
  • IPhone app - invoke function on incoming call
  • Fetching the value from textField
  • NSString copy not copying?
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com