w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
my scrollview in viewcontroller is not displaying the tableview in the container
I think you are implementing the app in both the orientations. Also the frame setting is done in change orientation method. When the first time the code executes tis setting of frame doesnt happen since orientation call doesnt happen.Make sure the frame is initally set properly in the IB, else make sure it is set in the -viewDidLoad or -viewWillAppear method.

Categories : Iphone

How to use TableView inside viewcontroller?
So far so good, you just have to implement UITableViewDataSource and UITableViewDelegate in your implementation file. Required functions are as follows; - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return [regions count]; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { // Number of rows is the number of time zones in the region for the specified section. Region *region = [regions objectAtIndex:section]; return [region.timeZoneWrappers count]; } - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { // The header for the section is the region name -- get this from the region at the section index. Region *region = [regions objectAtIndex:section]; return [

Categories : Objective C

Add Dynamic TableView in a Horizontal ScrollView
Here ya go you can set the Layout as a horizontal scroll view and the tablelayout is the child <HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".EvacRouteTableActivity" > <TableLayout android:id="@+id/TableLayout01" android:layout_width="match_parent" android:layout_height="wrap_content" android:stretchColumns="0"> <TableRow android:id="@+id/TableRo

Categories : Android

tableview in scrollview wont scroll
You most likely need to set the content size of the containing UIScrollview. [containingScrollView setContentSize:youtTableView.contentSize]; You should be able to get the appropriate contentSize after you ViewDidLayoutSubviews method in your UIViewController lifeCycle.

Categories : IOS

TableView with different cell types or ScrollView with inner TableViews
Create multiple custom cells and start integrate into your tableview. If you want to show the cells based upon the content you can calculate the internal elements size and take the highest element hight and make the cell height. Now you can observe that cells will display based upon the highest element hight.I think it will full fill your requirement.

Categories : Iphone

Changing the size of ScrollView not working within the tableView
Also you need to adjust the height of cell in UITableView DataSource. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath; Because you reuse the cell inside tableview

Categories : Iphone

Receiving memory warning in ViewController ("Page swipe Style ScrollView")
I've recently had problems with the UITableView and in my case it was the creation of the UITableViewCell which was wrong. In fact, there are at least two things to check: Consider using autorelease for UITableViewCell: UITableViewCell * cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier] autorelease]; Best practice wants you to reuse the UITableViewCell instances through the usage of [tableView dequeueReusableCellWithIdentifier] (see example below taken from cellForRowAtIndexPath) UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) cell = [self tableViewCellWithReuseIdentifier:CellIdentifier]; The second part, requires you to assign and handle an 'identifier' (a string used t

Categories : Iphone

Getting tableView to scroll as one with parent scrollView after being added with addChildViewController
As it turns out I think I was just making things way too complicated with this approach. Instead, I turned my child view controllers into subclasses of UIView, added a UITableView to that, then added the UIView to the parent's scroll view as a subview. Here's an example in case anyone is interested: My container: class ProfileController < SharedController def viewDidLoad super scroll_frame = self.view.bounds @scroll = UIScrollView.alloc.initWithFrame(scroll_frame) @scroll.bounces = true @scroll.delegate = self @scroll.alwaysBounceVertical = true @scroll.contentSize = CGSizeMake(UIScreen.mainScreen.bounds.size.width, scroll_frame.size.height) end def tap_child(sender) set_active_tab(sender) controller = ChildPartial.alloc.initWit

Categories : IOS

MONOTOUCH open a viewcontroller on tableview cell is clicked
Generally, you want a NavigationController to be the "top" element in your app, wrapping all the other controllers. In your AppDelegate, create a NavigationController, and make it the root of your application. Then create an instance of your Search controller and push it onto the NavigationController. Finally, add a NavigationController property to the constructor of your TableSource. NavigationController nav; public HotelTableSource (DtoHotelinformation[] items, NavigationController nav) { this.nav = nav; tableItems = items; } When you create your TableSource, pass the NavigationController reference in. You can do this because all ViewControllers have a property that points to their NavigationController, if they are contained within one. HotelSearchTable.Source = new HotelT

Categories : IOS

-[ViewController respondsToSelector:]: message sent to deallocated instance - on tableview scroll
I successfully found the bug. It was because of a custom control in a cell. It was retaining and releasing explicitly being non-ARC (but included in ARC project). Gesture was causing no problem. Removing those lines solved my problem.

Categories : IOS

TableView inside ViewController but keeping inheritance /subclass system
If you want to use the same code in two different classes, then why not abstracting this code into a new class? I am not exactly familiar with your code, but as an example I will provide this: Imagine that you have 2 view controllers that do completely different things, however they are supposed to resize the same way and be able to respond to a certain touch event exactly the same. In this case I would create a SuperViewController (just an arbitrary name) and subclass mentioned 2 view controllers from this super class. I hope this provides you with some help. Cheers!

Categories : IOS

Stop activityIndicator in Embedded TableView Cell Upon Return From Detail ViewController
Calling reloadData in the table view controller's viewWillAppear would work as long as in the cellForRowAtIndexPath method, you're setting the state for UIActivityIndicatorView by calling it's stopAnimating method (or simply remove it from the view) for any cell that shouldn't be spinning. You'll need to reference the activity indicator via the accesstoryView property. In your data, you could store a property that indicates whether the indicator should still be spinning for that map and set it appropriately. Another method would be to stop the activity indicator in prepareForSegue, just prior to showing the map view.

Categories : IOS

How can I reach the presentViewController method in my ViewController with this hierarchy? VC -> TableView -> Cell -> Button
I would suggest putting the button's action method in the controller that needs to do the presentation. Depending on your current design, this might be a bit of work right now to set up, but I think it will pay off in understandability and flexibility in the future.

Categories : Objective C

Do I need a ViewController container or a composite view?
Generally speaking, if I can avoid it I try not to subclass UIView and instead do everything within UIViewController subclasses. A controller is usually required anyway (model/view glue code, user interaction, delegate stuff, notification handling, etc.), so if no custom drawing is needed it is usually possible to do without a UIView subclass. In your case I could envision one reusable UIViewController subclass that represents a list entry. It has the following responsibilities: Create two alternate view hierarchies (collapsed/button, expanded/panel) Toggle between the view hierarchies in reaction to user interaction (with/without animation) And another UIViewController subclass that represents the entire list. It has the following responsibilities: Override the appropriate methods

Categories : IOS

How do I pass data from my ViewController to a Container View?
You can use prepareForSegue just like any other two controllers -- that method will be called after the two controllers are instantiated, but before either viewDidLoad runs. The other way to do this is to use the parent controller's childViewControllers property (the embedded controller is a child). So, the child will be self.childViewControllers[0]. After Edit: - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([[segue identifier] isEqualToString:@"EmbedSegue"]) { MyEmbeddedController *embed = segue.destinationViewController; embed.labelString = self.stringToPass; } } Of course, you have to change the names to what you have. Make sure the name you give to the segue in IB matches the one you check for in the if statement. In this example

Categories : IOS

What's the purpose of dragging the container to the black bar under the viewController?
This is the Interface Builder scene dock, which displays a view controller's top level objects.

Categories : IOS

All Edittext items not displaying in scrollview
For me the Password field works, seems fine (I copied you XML to test it). If you use eclipse try Project>Clean. I had similar Problems. Happy Coding EDIT(Result):

Categories : Android

Displaying ViewController when textField in UIWebView is pressed
Firstly you need to add a button to your UIWebView Something like: <a href="#" class="buttonStyle">Click me!</a> Execute custom code by clicking on a link(button) in html Then implement shouldStartLoadWithRequest. You button links should look like this: <a href="button://dosomething" class="buttonStyle">Click me!</a> Now implement shouldStartLoadWithRequest like this: - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { // only do something if a link has been clicked... if (navigationType == UIWebViewNavigationTypeLinkClicked) { // check if the url requests starts with our custom protocol: if ([[[request URL] absoluteString] hasPre

Categories : Iphone

Displaying data from multiple classes in tableview
Instead of getting three objects you can create a table view just with strings. Like this: TableView<ObservableList<String>> table = new TableView<>(); And define the columns to get Strings: for (int i = 0; i < NUM_COLUMNS; i++) { TableColumn<ObservableList<String>, String> col = new TableColumn<>("Col#"+i); final int finalI = i; col.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<ObservableList<String>,String>, ObservableValue<String>>() { @Override public ObservableValue<String> call(CellDataFeatures<ObservableList<String>, String> cdf) { return new SimpleStringProperty(cdf.getValue().get(finalI)); }

Categories : Java

pushing a ViewController from a Container View changes its view frame to original size
What you say you're doing isn't possible. You can't do a push if your controller isn't embedded in a navigation controller. If you embed Child View 1 in a navigation controller, what you're trying to do should work.

Categories : IOS

Container element within
not displaying
You have a tiny mistake: change: header section #container to header section#container in your CSS as in: header section#container { width: 900px; height: 30px; border: thin dotted black; margin: 0 auto; } What you did is basically looking for an element width id="container" inside the section.

Categories : CSS

layout_weight does not work when the layout inside a ScrollView is larger than the ScrollView
Try setting layout_height="0dp" on the elements that have layout_weight. The enclosing layout object will use any free space to grow them as much as it can. Also your use of weightSum is a bit questionable. Normally weightSum should be >= the total weights of the enclosed views. You have one weightSum where none of the directly enclosed views have weight and another where the total weight of the enclosed views exceeds weightSum. This second case will lead to strange behavior.

Categories : Android

Button click not responding in ScrollView when I create outlet of ScrollView in iOS
I had similar issue. What I did was remove entire hierarchy involving problematic view (in this case Button 2 and scroll view), then recreate them. Then recreate outlets and IBActions. This works because storyboard is an xml document and sometimes xcode messes things up in writing it.

Categories : IOS

How to make scrollview scroll when image is moved towards edge of the scrollview
I am not sure if this is what you are looking for. Check this out http://www.informit.com/articles/article.aspx?p=1998968&seqNum=13

Categories : IOS

In ViewController.m, how can I access a property declared in ViewController.h by a string?
You can iterate through all the buttons in self.view if they are added to the viewcontroller's view with the following for (UIButton *button in self.view.subviews) { // your code here }

Categories : Iphone

Pass data from one viewcontroller to existing viewcontroller programmatically
crete two class methods in myAppDelegate for setting data and getting data from Appdelegate,you can access those methods by using APpdelegate class name. Setter method +(void)setGlobalString:(NSString *)stringgValue{ [[NSUserDefaults standardUserDefaults] setObject:stringgValue forKey:@"globalValue"]; // you can save string value here by using NSUserDefaults or any thing else } Getter method +(NSString *)getGlobalString{ return [[NSUserDefaults standardUserDefaults] forKey:@"globalValue"]; } you can call methods like [myAppDelegate setGlobalString:yourString]; NSString *str = [myAppDelegate getGlobalString];

Categories : IOS

How to access a variable from one viewController's method body to another ViewController
if you want the numberOfImagesUploaded to be access into the secondViewController then there are several way : You can send that variable to the custom init method like: initWithnumberOfImagesUploaded:(int)num; You can use the appDelegate class . where you can declare that as a property and it will shared throughout the application but somewhere I have read that it is not the pure way . Probably the pure way is to use Sigleton class. then you can preserve the state of that variable through out your application .

Categories : Objective C

Scrollview inside a scrollview in android issue
Try this code. It is working for me` parentScrollView.setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { findViewById(R.id.childScrollView).getParent().requestDisallowInterceptTouchEvent(false); return false; } }); childScrollView.setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { // Disallow the touch request for parent scroll on touch of // child view v.getParent().requestDisallowInterceptTouchEvent(true); return false; } });`

Categories : Android

How to pass NSURL object from one viewcontroller to another viewcontroller
I assume that you're performing a segue from one VC to another. If so, you can do this in your prepareForSegue:sender: method: if ([segue.identifier isEqualToString:@"segueToListViewController"]) { [(ListViewController *)segue.destinationViewController setURL:[NSURL URLWithString:@"http:// some url"]]; } You have to declare a property in your destination VC to handle the URL, and you will need an accessor method to set that property. EDIT As danypata suggested, if you're not using segues, try the following ListViewController *listViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"ListViewControllerIdentifier"]; [listViewController setURL:[NSURL URLWithString:@"http:// some url"]]; [self presentViewController:listViewController animated:YES completion:nil]

Categories : IOS

How to instantiate a second ViewController and stop the methods of the first ViewController
Have a look at - (void)viewWillDisappear:(BOOL)animated and - (void)viewDidDisappear:(BOOL)animated You can implement these methods on your first view controller to stop/disable any activity or touch detection.

Categories : IOS

tableview doesn't see the tableview view for header in section method
You have a typo in the viewDidLoad method: self.profileTableView.dataSource = self; self.profileTableView.dataSource = self; One of these should be delegate.

Categories : IOS

Preserve Tableview Cell values while Scrolling TableView in iOS
Try this code. Add this code in your cellFotRowAtIndexPath NSArray *subviews = [[NSArray alloc] initWithArray:cell.contentView.subviews]; for (UIView *subview in subviews) { if([subview isKindOfClass:[UIView class]]) [subview removeFromSuperview]; else if([subview isKindOfClass:[UIImageView class]]) [subview removeFromSuperview]; else if([subview isKindOfClass:[UILabel class]]) [subview removeFromSuperview]; else if([subview isKindOfClass:[UISwitch class]]) [subview removeFromSuperview]; } [subviews release];

Categories : IOS

self.tableView is nil and different from the tableview that is calling numberOfSectionsInTableView
in .h: @interface YourViewController: UIViewController <UITableViewDataSource,UITableViewDelegate> in .m : YourTableView.delegate = self; YourTableView.dataSource = self; tableView delegates: - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return numberofRowsYouWant; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { // make your cell..... return cell; } If you don't miss any step of these, it should work correctly ! Of course if you use IB, don't forget to connect your tableView with the IBOutlet ! You can reload your tableView for example a method like this: -(

Categories : IOS

Trying to add cell from existing tableview to a new tableview when a button is pressed (Add to favorites button)
"i know I'm going to get a comment by some admin that this isn't a answer" but a much easier way would be reloading your table view with the array of favorites information after user decides they want to see favorites. Other then that what issues are you having with this and i will further re-edit my answer to help you, are you simply not getting any results at all? adding answer below: Looks like for your situation this fits your needs - (void)checkButtonTapped:(id)sender event:(id)event { NSSet *touches = [event allTouches]; UITouch *touch = [touches anyObject]; CGPoint currentTouchPosition = [touch locationInView:self.tableView]; NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint: currentTouchPosition]; if (indexPath != nil) { [self tableView: self.tableView accessoryBut

Categories : Objective C

Left div container as links/nav which upon click of a link, displays content in right div container?
This JSFiddle may be helpful to you. or code : HTML : <div id="wrapper"> <div id="left_div"> <a href="#" id="link1">Link1</a> <a href="#" id="link2">Link2</a> <a href="#" id="link3">Link3</a> <a href="#" id="link4">Link4</a> </div> <div id="right_div"> <div class="container"> </div> </div> </div> Javascript ( Jquery ) $(document).ready(function(){ $("#link1").click(function(){ animateDiv("right_div .container"); $("#right_div .container").html("You have Click on line1"); }); $("#link2").click(function(){ animateDiv("right_div .container"); $("#right_div .container").html("You have Cl

Categories : Javascript

Container-Bound Google Script not executing even after the container has been shared
The button will run under the users permission. If its anonymous it wont run if it needs any api permission (like reading the spreadsheet) since there is no user. For non anonymous users, you need to add a menu item that will trigger the google permission dialog (just do any dumb api call from it). After the user approves it will be able to click the image button

Categories : Google Apps Script

Can't create container in Azure blob storage with the same name as a deleted container
Although this is an old thread, I had the same question a few days ago, and wanted to post my findings: http://msdn.microsoft.com/en-us/library/azure/dd179431.aspx states under the Exceptions to Default Timeout Interval section: A container that was recently deleted cannot be recreated until all of its blobs are deleted. Depending on how much data was stored within the container, complete deletion can take seconds or minutes. If you try to create a container of the same name during this cleanup period, your call returns an error immediately.

Categories : Python

what is the better way to position two elements in a container using CSS? (one on the left and one on the right of its container)
i think there wont be any problem ..this can be also achieved in may other ways you can also use div.wrap to wrap #first & #second then you could use display:inline-block; in #first & #second while display:inline; in div.wrap and also see should you use inline-block as a substitute of float and also float vs inline-block you could use float:left; only in #first then #second would inherit it.it will give you side by side contents you can also use display:table-row; for div.wrap and display:table-cell; for #first & #second.but its better to avoid

Categories : HTML

Organize container content by container height
There is a standard algorithm Subset Sum Problem for solving this. Problem says You have n integers. Divide n integers into two sets such that |Set1| - |Set2| is minimum. where |Set(i)| represents the sum of elements in ith set. I see you have a similar problem here. Assume your containers as two sets and each box height as an integer which is going to be put in that set. Problem is we have to divide the integers (boxes) in such a way that heights of two containers remain minimum. Relevant Links: Subset Sum Problem - Wiki Geeks for Geeks tutorial - Good One

Categories : Javascript

I want to add class in the container while droping a div in the container
Check jQuery UI documentation for droppable method used with sortable. You can see the example here.

Categories : Jquery



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.