Skip to content

Instantly share code, notes, and snippets.

View nishitpatel's full-sized avatar
🏠
Working from home

Nishit nishitpatel

🏠
Working from home
  • Kotak Securities Pvt. Ltd.
  • Navi Mumbai
View GitHub Profile
@nishitpatel
nishitpatel / Terminal
Last active August 1, 2017 06:40
Mac Terminal Usefull commands
Show All Files in Mac system
step 1: Open Terminal
step 2: write below commands
$ defaults write com.apple.finder AppleShowAllFiles YES
$ killall Finder
1 - first command will visible all files including hidden files
2 - Close all finder window
3 - Window + ALt + right click on finder -> Relunch
@nishitpatel
nishitpatel / AppDelegets.h
Created February 28, 2017 12:19
CoreData Setup
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (strong, nonatomic) NSManagedObjectModel *managedObjectModel;
@property (strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;
@nishitpatel
nishitpatel / Readme.text
Created April 10, 2017 13:37
Add GitIgnore to existing Repository.
Step 1: Mannually add git ignore file on git server with predefine templates for ex. if you are adding gitignore file in
iOS project than user Object-C template.
Step 2: After successfully adding git ignore update your local branch code with latest code.
Step 3: While Merging master code with local code may be you will see VIM editor to add commit message. So for VIM editor
Just press ESC -> : -> x it will close VIM editor. After than perform
Git add .
Git commit -m "COMMIT MESSAGE"
Git Push origin "BRANCH_NAME"
Step 4: After you run your project you will still see the untracked files. To remove those files perform following setps.
May be in your repository you will see any other file so below path is just for reference please don't take it seriousally
@nishitpatel
nishitpatel / ISSUE SOLVING XCODE
Last active July 26, 2017 04:52
IOS Xcode issues and Solutions
1: Non Moduler Framwork
Issue: Include of non-modular header inside framework module 'IBMMObileFirstPlatformFoundationHybrid.MFPMainViewController'
Solution: GO TO -> Target Build Setting -> Find "Allow Non-modular Includes In Framework Modules" -> Change to YES
Reference: https://stackoverflow.com/questions/27776497/include-of-non-modular-header-inside-framework-module
2: Cordova/CDVPlugin.h File not found
Solution: For xcode7 add "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" to your Header Search Paths
(and you may need to set Enable Bitcode to No - was necessary for me, but may be related to different problem with xc7)
Reference: https://stackoverflow.com/questions/10714600/cdvplugin-h-file-not-found-in-cordova-as-component-cleaver
@nishitpatel
nishitpatel / Controller.m
Last active July 1, 2017 13:48
Auto Scroll whenever keyboard appears for TextField using UIScrollView
Step 1: Create UI Using UIScrollView (Pur all your elements inside UIScrollView)
Step 2: Implement UITextFieldDelege to UIViewController<UITextFieldDelegate>
Integrate Below code into controller.m file
-(void) viewDidLoad{
self.textField.deleget = self;
}
- (void) scrollViewAdaptToStartEditingTextField:(UITextField*)textField{
@nishitpatel
nishitpatel / UIColor_HexString.h
Created July 26, 2017 13:12
Create UIColor Categories
#import <UIKit/UIKit.h>
@interface UIColor(HexString)
+ (UIColor *) colorWithHexString: (NSString *) hexString;
+ (CGFloat) colorComponentFrom: (NSString *) string start: (NSUInteger) start length: (NSUInteger) length;
@end