Skip to content

Instantly share code, notes, and snippets.

View naveedmcs's full-sized avatar
👨‍💻
Nothing is interesting if You are not interested.

Muhammad Naveed naveedmcs

👨‍💻
Nothing is interesting if You are not interested.
View GitHub Profile
@naveedmcs
naveedmcs / swift Libraries
Created August 8, 2018 14:03
swift Libraries
https://swift.libhunt.com/sclalertview-swift-alternatives
@naveedmcs
naveedmcs / lectures swift slides
Created June 28, 2018 17:49
lectures swift slides
https://drive.google.com/drive/folders/1-TWZDChwwzkiGzt78QlPZDzN-j82JfR6
add new class
public class TablessControl : TabControl {
protected override void WndProc(ref Message m) {
// Hide tabs by trapping the TCM_ADJUSTRECT message
if (m.Msg == 0x1328 && !DesignMode) m.Result = (IntPtr)1;
else base.WndProc(ref m);
}
}
@naveedmcs
naveedmcs / NSPredicate an NSArray of Dictionary objects.txt
Created February 27, 2018 20:33
NSPredicate an NSArray of Dictionary objects in objective c
https://www.youtube.com/watch?v=Xf5QDG5Y2TU
@naveedmcs
naveedmcs / delegate.m
Last active February 26, 2018 11:16
Delegate Example in Objective c
//Example is about: Delegate and Protocol to send data back to ViewController
//let Suppose vew have two viewControllers are names 1: FirstVC 2: SecondVC
// lets implment protcol and delegate to send data from SecondVC to FirstVC
//In SecondVC.h file
@protocol SecondVCDelegate <NSObject>
@required
- (void)dataFromController:(NSDictionary *)dic;
@end
@naveedmcs
naveedmcs / LearningIOS in Advance
Last active March 11, 2018 19:15
Learning IOS programming
2 http://www.ios-developer.net/iphone-ipad-programmer/development/. top ranking
1: https://docs.kii.com/en/guides/cloudsdk/ios/managing-data/json-document/get-key-value/
@naveedmcs
naveedmcs / getCurrentDayMonthYear.m
Last active February 22, 2018 14:50
getCurrentDayMonthYear Objective C full Example
//1: add this function in .m file
-(NSMutableDictionary *)getCurrentDayMonthYear{
NSDate *now = [NSDate date];
// Specify which units we would like to use
unsigned units = NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay;
NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
NSDateComponents *components = [calendar components:units fromDate:now];
NSNumber *year = [NSNumber numberWithInt:(int)[components year]];
@naveedmcs
naveedmcs / Pods.txt
Created February 15, 2018 13:17
Pods for Swift
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'Corvis' do
use_frameworks!
pod 'Alamofire'
pod 'AlamofireImage'
pod 'SwiftyJSON'
pod 'KVNProgress'
@naveedmcs
naveedmcs / iOS-UploadImage.h
Created February 12, 2018 19:40 — forked from mombrea/iOS-UploadImage.h
example of a multi-part form post in objective-c
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"REST URL PATH"]];
NSData *imageData = UIImageJPEGRepresentation(image, 1.0);
[request setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData];
[request setHTTPShouldHandleCookies:NO];
[request setTimeoutInterval:60];
[request setHTTPMethod:@"POST"];
NSString *boundary = @"unique-consistent-string";
@naveedmcs
naveedmcs / alertViewController.m
Created February 12, 2018 11:17
AlertViev-Controller template objective C
- (void)logoutButtonPressed
{
UIAlertController * alert = [UIAlertController
alertControllerWithTitle:@"Logout"
message:@"Are You Sure Want to Logout!"
preferredStyle:UIAlertControllerStyleAlert];
//Add Buttons
UIAlertAction* yesButton = [UIAlertAction