This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "JSONModel.h" | |
@interface NSArray (CRNSArrayJSON) | |
- (NSString*)toJSONString; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AppConfig { | |
public static final boolean DEBUG = true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class InternetHelper { | |
public static boolean isConnectingToInternet(Context context) { | |
ConnectivityManager connectivity = | |
(ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); | |
if (connectivity != null) { | |
NetworkInfo[] info = connectivity.getAllNetworkInfo(); | |
if (info != null) { | |
for (int i = 0; i < info.length; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object[] objects = ... | |
new ArrayList<Sound>(Arrays.asList(objects))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<resources> | |
<style name="ToolbarDark" parent="Widget.AppCompat.Toolbar"> | |
<item name="android:background">@color/primary_dark_material_dark</item> | |
<item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item> | |
<item name="theme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item> | |
</style> | |
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Check if Accessibility service is enabled | |
* | |
* @param context | |
* @return | |
*/ | |
private boolean isAccessibilitySettingsOn(Context context) { | |
int accessibilityEnabled = 0; | |
final String service = "<apppackage>/<servicepackage>"; | |
boolean accessibilityFound = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class .. : UITextFieldDelegate{ | |
// MARK: - Hide Keyboard | |
public override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) { | |
self.view.endEditing(true) | |
} | |
public func textFieldShouldReturn(textField: UITextField) -> Bool { | |
textField.resignFirstResponder() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject!) { | |
if var rbSegue = segue as? RBStoryboardModalSegue { | |
rbSegue.transitionStyle = UIModalTransitionStyle.CrossDissolve | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Array { | |
/** | |
Get the index of the item. | |
Array items must conform protocol Equatable. | |
:param: item item used to find it's index | |
:returns: index of the item if founded, | |
otherwise -1 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.tabBar.selectedImageTintColor = UIColor.colorWithHexString(Constants.mainTabBarSelectionColor) |
OlderNewer