Anton Bukov

Results 268 comments of Anton Bukov

Yep! Enumerating all prime numbers is not simple. But we can find sequence of a lot of primes with a basic formula. This article contains most famous prime lists: http://en.m.wikipedia.org/wiki/List_of_prime_numbers

Looks like we can just try to find `d` value to determine if `e` is valid coprime to `phi`. And check this only after regexp is true for onion domain...

Copy-paste solution: ``` @property (nonatomic, assign) BOOL isMenuVisible; ``` ``` - (void)sideMenu:(RESideMenu *)sideMenu didShowMenuViewController:(UIViewController *)menuViewController { self.isMenuVisible = YES; } - (void)sideMenu:(RESideMenu *)sideMenu didHideMenuViewController:(UIViewController *)menuViewController { self.isMenuVisible = NO; }...

My solution is not good, thats better: ``` - (IBAction)menuTapped:(id)sender { [self.sideMenuViewController presentLeftMenuViewController]; } ```

Thats enough better solution: ![2015-04-21 17 16 41](https://cloud.githubusercontent.com/assets/702124/7254227/58d5b40e-e84a-11e4-9204-25d4dfa478cc.png) Just Ctrl+Drag from button to `ViewController`

Horizontal line can be implemented as part of buttons background image. You need white rect with single top edge line.

You can just use UIButton's method `setBackgroungImage:forState:` for state normal.

So only current months tiles are in normal state. Next and prev month tiles are in disabled state. You should use `nil` image for disabled state.

You can use your trick with thin subview. ``` topBarVIew.tag = 555; [self addSubview:topBarVIew]; ``` Just in method `- (void)setDisabled:(BOOL)disabled` add line: ``` [self viewWithTag:555].hidden = disabled; ```

Every tile in calendar is really UIControl subclass and setDisabled:YES is called automatically for days of prev and next month. You should override this method and call super method inside.