Anton Bukov
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:  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.