dwinnbrown

3

votes
1

answer
17

views

Exclude a product category from Related products in WooCommerce

I am trying to exclude a product category (id: 78) from the related products section in WooCommerce. I have a custom query already in place which only shows related products from the child category. This is my code:
dwinnbrown
1

votes
1

answer
414

views

Google VR View - Head Tracking

So I am using the Google VR View/Cardboard SDK for android to display a 360 video in my app. However head tracking doesn't appear to work on either the google sample app or my own one. Is there a method or function I am missing that would enable this functionality that they describe? This is how I...
dwinnbrown
1

votes
2

answer
1.6k

views

Swift - Opening web view links modally

So I have a web view displaying a page and would like to open any links in a new view controller containing a web view modally (like twitter and Facebook do). I have worked out how to get the url of the link clicked: func webView(webView: UIWebView, shouldStartLoadWithRequest request: NSURLRequest,...
dwinnbrown
4

votes
1

answer
58

views

PHP - Displaying a $ statement inside array

I have a statement $latest_pollid and would like to put this inside of an array that looks something like this: array( 'comment_status' => 'open', 'ping_status' => 'closed', 'post_author' => $author_id, 'post_name' => $slug, 'post_title' => $pollq_question, 'post_s...
dwinnbrown
2

votes
2

answer
1.6k

views

Dynamic Content for iOS app

I am currently starting work on an iOS App which will display new content weekly. The app will need to display videos and text as well as a few images. The problem is that I need to be able to update the content the app shows without releasing a new update every time. Therefore I am at a loss as to...
dwinnbrown
5

votes
1

answer
1k

views

Hiding iAd ADBannerView in Swift when ad fails to load - no delegate or delegate does not implement didFailToReceiveAdWithError

This is the code I am using: var bannerView = ADBannerView() self.canDisplayBannerAds = true //show ad banner if an ad loads func bannerViewDidLoadAd(banner: ADBannerView!) {bannerView.hidden = false} //hide ad banner if the ad fails to load func bannerViewFailsToLoadAd(banner: ADBannerView!,didFail...
dwinnbrown
1

votes
3

answer
3.8k

views

Swift - Stop avaudioplayer

I am trying to build a soundboard into an app and have figured out an efficient way of using tags to control playing the sounds. However I am now trying to integrate a pause button that can be used with the .stop() method on the AVAudioPlayer however I get an error with my current code: EXC_BAD_ACCE...
dwinnbrown
2

votes
2

answer
75

views

Javascript - Display remaining characters of text area

So I have set the maxlength of my textarea to be 200 and I would like to display a nice countdown function that shows how many characters they have left as they are typing. My HTML is as follows: Description And the JS that I am trying to do it with is like this: window.onload = textareaLengthCheck(...
dwinnbrown
3

votes
2

answer
10.8k

views

Swift - Checking size of UIImageView

I am trying to print a line to the debugger/console to show the dimensions of the UIImageView object I have. I was trying to use the following code but get an error saying UIImageView doesn't have a member named 'size'. This was my code: @IBOutlet var Image: UIImageView! override func viewDidLoad()...
dwinnbrown
3

votes
4

answer
82

views

CSS - Centering an image

So I have an image which is acting as a background and it 'scales to fill' the frame which is just how I want it, but the image is not centered and thus when the window is smaller like on a phone, the image displayed is just the edge. Here is the code I was using: HTML CSS .Background { display: blo...
dwinnbrown
3

votes
3

answer
497

views

Turning jQuery event listener on after off

So I want to turn off a jQuery event under a certain condition (if the user scrolls down) but if they do the opposite (scroll up) then I want the event turned to on so that it will fire. This is my code but as I am new to jQuery, I am pretty sure I'm missing something in the handler - I just don't k...
dwinnbrown
1

votes
2

answer
3.1k

views

iOS - Native Scrolling in iFrame

So I have an iFrame displaying a Facebook page and I am trying to enable the native 'bounce' type scrolling however can't get anything to work. I have tried this: iframe { overflow-y: scroll !important; -webkit-overflow-scrolling: touch !important; } But have had no luck so far - tested on both simu...
dwinnbrown
1

votes
3

answer
74

views

Javascript - Ensure input has at least one number

So I have a textarea and am doing some front-end validation on it with jQuery and Regex. The criteria for the input are as follows: must have 5-12 characters cannot contain any special characters needs at least one number it is the last point that I am struggling with. This is how I am validating th...
dwinnbrown
2

votes
0

answer
388

views

iOS WebView - Open link in SFSafariViewController

So I am trying to detect a link click within a webView and then present this url in the new SFSafariViewController however am having some issues. Anyone got any ideas? This is what I am currently doing: import UIKit import SafariServices class ViewController: UIViewController { @IBOutlet weak var we...
dwinnbrown
2

votes
2

answer
1.2k

views

Swift - UIProgressView fills diagonally

So I set up a UIProgressView to fill after 3 seconds as well as increasing the height of the bar a bit. However when it fills up, it fills diagonally as opposed to just filling from one side to the other. The bar starts in the top right corner and then expands to fill the progress view just before i...
dwinnbrown
2

votes
4

answer
1.1k

views

CSS Media Queries - Not Working

I have a set of breakpoints that I am trying to work with and am using the following CSS code to change css rules however the rules are only being applied to screens over 1200px wide and not the others. /* Large Desktop Devices */ @media (min-width: 1200px) { .header { height: 120px; } } /* Small...
dwinnbrown
10

votes
2

answer
9.3k

views

Xcode - Bundle format unrecognized, invalid, or unsuitable

Ok so I have just about managed to get to this point on my own but am now having some issues code signing the app specifically with the AdMob framework. I am getting this error: Command /usr/bin/codesign failed with exit code 1 the details it are giving are as follows: Applications/MyApp.app/Framewo...
dwinnbrown
1

votes
3

answer
6.7k

views

How to restart an app when resumes from multi-tasking

So my app relies on an internet connection and every time the app is opened from the home screen it checks using Reachability and then allows the user to continue or tells them to get connected. My issue however is that when the app is resumed from multitasking, it skips the initial view controller...
dwinnbrown
2

votes
2

answer
68

views

Adding Cc to PHP mail

So I am mailing the contents of a form to a client and he would like the person who sent the form to be Cc'd in. I have done some research and it appears I need to use the header code to set the from, subject and cc but my code is set up differently - please see below: Would it be possible to do it...
dwinnbrown
8

votes
4

answer
9.4k

views

Swift - UIProgressView is not smooth with NSTimer

So I am using an NSTimer to let the user know the app is working. The progress bar is set up to last 3 seconds, but when running, it displays in a 'ticking' motion and it is not smooth like it should be. Is there anyway I can make it more smooth - I'm sure just a calculation error on my part.... If...
dwinnbrown
3

votes
2

answer
81

views

Using $(this) within .each()

I have a series of elements laid out in HTML I am trying to get the value of the href for each div with the class wsite-com-category-product-wrap and then use this to insert a new button with the same href. My current code is inserting all the links (for items with the class .wsite-com-category-pro...
dwinnbrown
49

votes
6

answer
77.3k

views

Detecting scroll direction

So I am trying to use the JavaScript on scroll to call a function. But I wanted to know if I could detect the direction of the the scroll without using jQuery. If not then are there any workarounds? I was thinking of just putting a 'to top' button but would like to avoid that if I could. I have now...
dwinnbrown
2

votes
2

answer
439

views

Xcode - Colours look different but should be the same

In my app, I am using the following color: #3D6D86 It is set to be a background color on a view controller and also to be the color for the navigation bar on a different view controller. However the problem is that the color appears different. I converted the hex to the correct type of UIColor notat...
dwinnbrown