Skip to content

Instantly share code, notes, and snippets.

View jedmund's full-sized avatar

Justin Edmund jedmund

View GitHub Profile
@jedmund
jedmund / Info.md
Last active January 18, 2016 02:33

I am trying to update a button's constraints when the keyboard is shown and hidden by adding/subtracting the keyboard's height from the constraint's constant.

I had this working previously, but after some re-factoring, it's stopped working. Previously, keyboardWillShow: and keyboardWillHide: were implemented exactly as shown below. I've since tried to use setNeedsUpdateConstraints and setNeedsLayout to try to force a refresh, to no avail.

When doing some simple print() debugging, buttonHorizontalConstraint.constant does get updated, but the changes just aren't reflected visually.

~/C/S/maitsu-api ❯❯❯ git hist ⏎
* 395b957 2016-01-07 | Removed versions from Gemfile and updated db schema (HEAD -> master) [Justin Edmund]
* 58d55b8 2015-02-07 | Projects#create rabl fix (origin/master) [Justin Edmund]
* a6204b0 2015-02-07 | Session object encapsulates user props into an array [Justin Edmund]
* d065da6 2015-02-07 | Added user id to access token return object [Justin Edmund]
* 08fd5e9 2015-02-01 | Fixed Project#update [Justin Edmund]
* ccea020 2015-02-01 | Refactored more Users Rabl [Justin Edmund]
* fe1cd35 2015-02-01 | Fixed Users#projects and #watching Rabl templates [Justin Edmund]
* 7de3e12 2015-02-01 | Refactored Projects Rabl [Justin Edmund]
* 85755f9 2015-02-01 | Refactored User#create Rabl [Justin Edmund]
/oauth/applications(.:format)
/oauth/applications/:id(.:format)
/oauth/applications/:id/edit(.:format)
/oauth/applications/new(.:format)
/oauth/authorize(.:format)
/oauth/authorize/:code(.:format)
/oauth/authorized_applications(.:format)
/oauth/authorized_applications/:id(.:format)
/oauth/revoke(.:format)
/oauth/token(.:format)
(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){var t="ui-effects-";e.effects={effect:{}},function(e,t){function i(e,t,i){var s=d[t.type]||{};return null==e?i||!t.def?null:t.def:(e=s.floor?~~e:parseFloat(e),isNaN(e)?t.def:s.mod?(e+s.mod)%s.mod:0>e?0:e>s.max?s.max:e)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(e,a){var o,r=a.re.exec(i),h=r&&a.parse(r),l=a.space||"rgba";return h?(o=s[l](h),s[u[l].cache]=o[u[l].cache],n=s._rgba=o._rgba,!1):t}),n.length?("0,0,0,0"===n.join()&&e.extend(n,a.transparent),s):a[i]}function n(e,t,i){return i=(i+1)%1,1>6*i?e+6*(t-e)*i:1>2*i?t:2>3*i?e+6*(t-e)*(2/3-i):e}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\
@import "base/reset";
// Thoughtbot libraries
@import "vendor/bourbon/bourbon";
@import "vendor/neat/neat";
@import "vendor/base/base";
// Helpers
@import "helpers/variables";
@import "helpers/functions";
@jedmund
jedmund / errors
Last active August 29, 2015 14:02
Uncaught TypeError: undefined is not a function backbone.marionette.js?body=1:22
------------------------------------------------------------------------------------------
c.extend.add backbone.marionette.js?body=1:22
c.extend.addInitializer backbone.marionette.js?body=1:22
(anonymous function) main.js?body=1:8
Uncaught TypeError: undefined is not a function backbone.marionette.js?body=1:22
------------------------------------------------------------------------------------------
c.extend.add backbone.marionette.js?body=1:22
c.extend.addInitializer backbone.marionette.js?body=1:22
RewriteEngine on
DirectoryIndex index.php
RewriteRule ^$ /index.php [L]
RewriteRule ^home$ /index.php [L]
RewriteRule ^about$ /about.php [L]
RewriteCond %{REQUEST_METHOD} GET
RewriteRule ^made/([^/]*)$ /project.php?p=$1 [L]
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# Turn on advanced bash completion if the file exists
if [ -f /usr/local/etc/bash_completion ]; then
. /usr/local/etc/bash_completion
fi
# Locate virtualenvwrapper binary
if [ -f ~/.local/bin/virtualenvwrapper.sh ]; then
rows = [
[0, 1, 2],
[3, 4, 5],
[6, 7, 8]
]
cols = [[], [], []]
// loop over the rows array with var i
// loop over one array in rows array with var j
{ include "header.htm" }
<div class="no_stage" id="content">
<div id="topbar">
<!-- tag for permalink url: show the project's permalink -->
<div class="left">
<a href="#top" rel="permalink">
<span class="title">{ show the project's title }</span>
</a>
<span class="foundation">{ show the project's foundation }</span>