fix iOS bug with the foreground/isInline flag

previously the foreground/isInline flag was always set to NO.    Now it
will be set appropriately.