Skip to content

Instantly share code, notes, and snippets.

View Adnan1990's full-sized avatar

Muhammad Adnan Adnan1990

View GitHub Profile
@Adnan1990
Adnan1990 / ViewController.h
Last active August 29, 2015 13:57
IOS Email Composing Using MessageUI Framework
#import <UIKit/UIKit.h>
#import <MessageUI/MessageUI.h>
@interface ViewController : UIViewController
@end
@Adnan1990
Adnan1990 / AppDelegate .h
Created March 10, 2014 13:00
Local Notifications
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
@Adnan1990
Adnan1990 / ViewController.h
Last active June 6, 2016 06:49
Sharing on fb or twitter using social.framework
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
@Adnan1990
Adnan1990 / AttributedText.m
Last active August 29, 2015 13:57
Using Attributed String in IOS
#import "ViewController.h"
@interface ViewController ()
@property (nonatomic, strong) UILabel *label;
@end
@implementation ViewController
- (NSAttributedString *) attributedText{
#import <MapKit/MapKit.h> // for Map Features in IOS App
#import <AVFoundation/AVFoundation.h> // for playing audio files in IOS
#import <MediaPlayer/MediaPlayer.h> // for playing video files in IOS
@Adnan1990
Adnan1990 / versions.m
Last active August 29, 2015 13:57
IOS version
/*
* System Versioning Preprocessor Macros
*/
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
@Adnan1990
Adnan1990 / ARC + -
Created March 20, 2014 11:52
Adding or Removing ARC from Single File
If you want to exclude a file from being compiled with ARC you can do so by setting a flag on the .m file:
Click the Project -> Build Phases Tab -> Compile Sources Section -> Double Click on the file name
Then add -fno-objc-arc to the popup window.
Likewise, if you want to include a file in ARC, you can use the -fobjc-arc flag.
@Adnan1990
Adnan1990 / learnCocos2d
Created April 3, 2014 11:10
Cocos2d[ A towards Z]
Install latest cocos version (currently v3.0 dmg file is installable)
@Adnan1990
Adnan1990 / HelloWorldScene.m
Created April 28, 2014 11:09
Animations in Cocos2d V3.0
//
// HelloWorldScene.m
// animation
//
// Created by Muhammad Adnan on 28/04/2014.
// Copyright Vizteck Solutions 2014. All rights reserved.
//
// -----------------------------------------------------------------------
#import "HelloWorldScene.h"
@Adnan1990
Adnan1990 / Submitting App To appstore
Created April 28, 2014 13:09
App Submission Process
https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/SubmittingYourApp/SubmittingYourApp.html