Question: I have a bunch of records in my database which all have the same Title but different Locations. Once I filter by within a location boundary, I want to filter out ones with the same Title. Is there an ActiveRecord way to do this? I know about `select`, but that will only return titles, and I actually need the entire record.

So I have a Business which has a Title. If I select all of the businesses within a given lat/long boundary, multiple instances with the same name (say, Subway) will be returned. I want to limit the result to 10.

In English: Given me ten records (the entire record, not just certain columns) where every title is unique amongst the ten returned.

Answer: 
I had similar issues with `UITextView`. It seems `scrollEnabled` property does not cancel autoscrolling. I have [solved](https://github.com/onegray/UITableKit/blob/master/TableKit/DefaultTheme/TKDefaultTextViewCellView.m) it by overriding `setContentOffset:` method.  

The following `preventScrolling` flag might help:

```
@interface MyScrollView : UIScrollView
@property (nonatomic, assign) BOOL preventScrolling;
@end

@implementation MyScrollView 
@synthesize preventScrolling;
-(void) setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated
{
    if(!self.preventScrolling) {
        [super setContentOffset:contentOffset animated:animated];
    }
}
@end

```
you have set the wrong *contentSize:* of scroll view.... 

always set the content size according to content inside scroll view, if content height and width is greater than scroll view height and width then only increase the content size else put it the same as its width and height of scroll view 

```
[self.mainScrollView setContentSize:CGSizeMake(4096, 4096)];

```

instead of it put this *contentsize:*

```
[self.mainScrollView setContentSize:CGSizeMake(mainScrollView.frame.size.width, mainScrollView.frame.size.height)];

```

may this will help you