Skip to content

Instantly share code, notes, and snippets.

@turboza
turboza / moveViewUp.m
Created January 19, 2014 14:35
[iOS] Ready made Code for moving up the View up when you bring up the Keyboard Ref: http://stackoverflow.com/questions/1126726/how-to-make-a-uitextfield-move-up-when-keyboard-is-present
#define kOFFSET_FOR_KEYBOARD 80.0
-(void)keyboardWillShow {
// Animate the current view out of the way
if (self.view.frame.origin.y >= 0)
{
[self setViewMovedUp:YES];
}
else if (self.view.frame.origin.y < 0)
{
@turboza
turboza / AJAX_Sample_Code.js
Last active December 20, 2015 01:59
AJAX Sample Code with JSON parsing
$.ajax({
url: "example.com/ex.json",
type: "get",
data: {var1:'value1',var2:'value2'},
dataType:'json',
success: function(content){
console.log(content.value);
},
error:function(){
console.log('error');